mirror of
https://github.com/blackboxprogramming/context-bridge.git
synced 2026-03-17 05:57:15 -05:00
Agent Coordination: - Epimetheus (Architect) identity assigned and registered - Connected to PS-SHA-∞ memory system (4,059 entries) - Task claimed from marketplace - Broadcasting to other agents Launch Documentation Created: - PUBLISH_TO_NPM.md - Complete npm publishing guide - STRIPE_LIVE_SETUP.md - Stripe live mode setup guide - AGENT_COORDINATION_REPORT.md - Full status and next steps - EPIMETHEUS_SESSION_COMPLETE.md - Session summary - Added all previous documentation to repo Launch Status: 98% Complete Blocked on: User actions (npm login + Stripe products) Ready: Screenshots, testing, submissions, announcements Next Steps: 1. User: npm login && npm publish (10 min) 2. User: Create Stripe products (5 min) 3. Capture 5 screenshots (15 min) 4. Manual testing on 4 platforms (20 min) 5. Submit to Chrome Web Store (30 min) 6. Launch announcements (10 min) Total time to launch: ~90 minutes Agent Body: qwen2.5-coder:7b (open source) Memory Hash: 4e3d2012 Collaboration: ACTIVE Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
71 lines
2.0 KiB
JavaScript
71 lines
2.0 KiB
JavaScript
const chalk = require('chalk');
|
|
const ora = require('ora');
|
|
const { getConfig } = require('../config');
|
|
const { getGistHistory } = require('../gist');
|
|
|
|
async function history(options) {
|
|
const config = getConfig();
|
|
|
|
if (!config.token) {
|
|
console.log(chalk.yellow('⚠ Not authenticated. Run:'), chalk.cyan('context login\n'));
|
|
return;
|
|
}
|
|
|
|
if (!config.gistId) {
|
|
console.log(chalk.yellow('⚠ No context initialized. Run:'), chalk.cyan('context init\n'));
|
|
return;
|
|
}
|
|
|
|
const spinner = ora('Fetching history...').start();
|
|
|
|
try {
|
|
const limit = parseInt(options.number) || 10;
|
|
const history = await getGistHistory(limit);
|
|
|
|
spinner.succeed(chalk.green('History fetched'));
|
|
|
|
console.log(chalk.bold.cyan(`\n📜 Version History (${history.length} most recent)\n`));
|
|
|
|
history.forEach((rev, index) => {
|
|
const date = new Date(rev.committedAt);
|
|
const ago = getTimeAgo(date);
|
|
|
|
console.log(chalk.bold(`${index + 1}. ${date.toLocaleString()}`), chalk.gray(`(${ago})`));
|
|
console.log(chalk.gray(` Version: ${rev.version.substring(0, 8)}`));
|
|
console.log(chalk.gray(` By: ${rev.user}`));
|
|
console.log(chalk.gray(` Changes: +${rev.changeStatus.additions} -${rev.changeStatus.deletions}`));
|
|
console.log();
|
|
});
|
|
|
|
console.log(chalk.gray(`Run ${chalk.cyan('context view')} to see current version\n`));
|
|
} catch (error) {
|
|
spinner.fail(chalk.red('Failed to fetch history'));
|
|
console.log(chalk.red(`Error: ${error.message}\n`));
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
function getTimeAgo(date) {
|
|
const seconds = Math.floor((new Date() - date) / 1000);
|
|
|
|
const intervals = {
|
|
year: 31536000,
|
|
month: 2592000,
|
|
week: 604800,
|
|
day: 86400,
|
|
hour: 3600,
|
|
minute: 60
|
|
};
|
|
|
|
for (const [unit, secondsInUnit] of Object.entries(intervals)) {
|
|
const interval = Math.floor(seconds / secondsInUnit);
|
|
if (interval >= 1) {
|
|
return `${interval} ${unit}${interval > 1 ? 's' : ''} ago`;
|
|
}
|
|
}
|
|
|
|
return 'just now';
|
|
}
|
|
|
|
module.exports = history;
|