TUI Gen 5: Major overhaul - Todo List, improved streaming, ESC to abort, cleaner UI

This commit is contained in:
Gemini AI
2025-12-14 04:02:03 +04:00
Unverified
parent e23a2a5efc
commit 63de8fc2d1
6 changed files with 5417 additions and 688 deletions

View File

@@ -683,7 +683,40 @@ function showProjectMenu() {
}
// Start with project menu
showProjectMenu();
// Start with auth check then project menu
(async () => {
const qwen = getQwen();
const authed = await qwen.checkAuth();
if (!authed) {
print(`\n${c.yellow}Authentication required. Launching web login...${c.reset}\n`);
const authScript = path.join(__dirname, 'auth.js');
await new Promise((resolve) => {
const child = spawn('node', [authScript], {
stdio: 'inherit',
shell: false
});
child.on('close', (code) => {
if (code === 0) {
print(`\n${c.green}Authentication successful! Starting TUI...${c.reset}\n`);
resolve();
} else {
print(`\n${c.red}Authentication failed or was cancelled.${c.reset}\n`);
process.exit(1);
}
});
});
// Re-check auth
const recheck = await qwen.checkAuth();
if (!recheck) {
process.exit(1);
}
}
showProjectMenu();
})();
function prompt() {
const promptStr = selectingAgent ? `${c.cyan}#${c.reset} ` : `${c.green}${c.reset} `;