feat: enhance project context loading and feature flag support in dashboard components

This commit is contained in:
catlog22
2026-02-25 18:59:49 +08:00
parent db5797faa3
commit eb9a62e085
16 changed files with 336 additions and 109 deletions

View File

@@ -93,7 +93,8 @@ export async function handleCliSessionsRoutes(ctx: RouteContext): Promise<boolea
tool,
model,
resumeKey,
launchMode
launchMode,
settingsEndpointId
} = (body || {}) as any;
if (tool && typeof tool === 'string') {
@@ -114,11 +115,12 @@ export async function handleCliSessionsRoutes(ctx: RouteContext): Promise<boolea
workingDir: desiredWorkingDir,
cols: typeof cols === 'number' ? cols : undefined,
rows: typeof rows === 'number' ? rows : undefined,
preferredShell: preferredShell === 'pwsh' ? 'pwsh' : 'bash',
preferredShell: preferredShell === 'pwsh' ? 'pwsh' : preferredShell === 'cmd' ? 'cmd' : 'bash',
tool: typeof tool === 'string' ? tool.trim() : undefined,
model,
resumeKey,
launchMode: launchMode === 'yolo' ? 'yolo' : 'default',
settingsEndpointId: typeof settingsEndpointId === 'string' ? settingsEndpointId : undefined,
});
appendCliSessionAudit({

View File

@@ -489,7 +489,7 @@ async function fetchSkillDirectoryContents(skillPath: string): Promise<GitHubTre
throw new Error(`GitHub API error: ${response.status} ${response.statusText}`);
}
return response.json();
return response.json() as Promise<GitHubTreeEntry[]>;
}
/**