mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 20:20:57 +00:00
feat(shell): enable PTY by default and various enhancements
### Shell & Interactive Terminal Improvements - PTY shell is now enabled by default instead of disabled - Improved shell output rendering, process termination, and added fallback warning - Background commands now properly capture subprocess PIDs on non-Windows ### Coding Plan Improvements - Simplified auth message, added /model tip, improved system info display - Reordered model list to prioritize glm-5, kimi-k2.5, MiniMax-M2.5 - Model selection is now preserved when updating if the model still exists ### Other Changes - Added shared symlink utility; debug logs now have latest alias - Unknown settings warnings go to debug log instead of user-facing warnings - Fixed subagent confirmation state detection - Removed debug UI from AgentCreationWizard Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
991ae9febc
commit
b48e3caa75
31 changed files with 729 additions and 314 deletions
|
|
@ -14,9 +14,7 @@ import type {
|
|||
InsightProgressCallback,
|
||||
} from '../types/StaticInsightTypes.js';
|
||||
|
||||
import { createDebugLogger, type Config } from '@qwen-code/qwen-code-core';
|
||||
|
||||
const logger = createDebugLogger('StaticInsightGenerator');
|
||||
import { updateSymlink, type Config } from '@qwen-code/qwen-code-core';
|
||||
|
||||
export class StaticInsightGenerator {
|
||||
private dataProcessor: DataProcessor;
|
||||
|
|
@ -54,40 +52,12 @@ export class StaticInsightGenerator {
|
|||
return outputPath;
|
||||
}
|
||||
|
||||
// Create or update the "latest" alias (symlink preferred, copy as fallback)
|
||||
private async updateLatestAlias(
|
||||
private async updateInsightSymlink(
|
||||
outputDir: string,
|
||||
targetPath: string,
|
||||
): Promise<void> {
|
||||
const latestPath = path.join(outputDir, 'insight.html');
|
||||
const relativeTarget = path.relative(outputDir, targetPath);
|
||||
|
||||
// Remove existing file/symlink if it exists
|
||||
try {
|
||||
await fs.unlink(latestPath);
|
||||
} catch {
|
||||
// File doesn't exist, ignore
|
||||
}
|
||||
|
||||
// Try symlink first (preferred - lightweight, always points to latest)
|
||||
try {
|
||||
await fs.symlink(relativeTarget, latestPath);
|
||||
logger.debug('Created insight symlink:', relativeTarget);
|
||||
return;
|
||||
} catch (error) {
|
||||
logger.debug(
|
||||
'Failed to create insight symlink, falling back to copy:',
|
||||
error,
|
||||
);
|
||||
}
|
||||
|
||||
// Fallback: copy file (works everywhere, uses more disk space)
|
||||
try {
|
||||
await fs.copyFile(targetPath, latestPath);
|
||||
logger.debug('Created insight copy:', targetPath);
|
||||
} catch (error) {
|
||||
logger.debug('Failed to create insight latest alias:', error);
|
||||
}
|
||||
await updateSymlink(latestPath, targetPath);
|
||||
}
|
||||
|
||||
// Generate the static insight HTML file
|
||||
|
|
@ -116,8 +86,7 @@ export class StaticInsightGenerator {
|
|||
// Write the HTML file
|
||||
await fs.writeFile(outputPath, html, 'utf-8');
|
||||
|
||||
// Update latest alias (symlink preferred, copy as fallback)
|
||||
await this.updateLatestAlias(outputDir, outputPath);
|
||||
await this.updateInsightSymlink(outputDir, outputPath);
|
||||
|
||||
return outputPath;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue