mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-28 09:23:08 +08:00
feat: 增加对 Windows CLI 工具的支持,允许使用 cmd 作为首选 shell,并改进错误处理
This commit is contained in:
@@ -341,9 +341,16 @@ export const useTerminalGridStore = create<TerminalGridStore>()(
|
||||
);
|
||||
|
||||
return { paneId: newPaneId, session };
|
||||
} catch (error) {
|
||||
console.error('Failed to create CLI session:', error);
|
||||
return null;
|
||||
} catch (error: unknown) {
|
||||
// Handle both Error instances and ApiError objects
|
||||
const errorMsg = error instanceof Error
|
||||
? error.message
|
||||
: (error as { message?: string })?.message
|
||||
? (error as { message: string }).message
|
||||
: String(error);
|
||||
console.error('Failed to create CLI session:', errorMsg, { config, projectPath, rawError: error });
|
||||
// Re-throw with meaningful message so UI can display it
|
||||
throw new Error(errorMsg);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user