fix: 修复 showPlan 工具交互逻辑和 JWT Token 问题
- 修复 pendingQuestions 缺失时无法提交回答的问题 - 添加 fallbackTaskId 参数支持直接发送到后端 - apiClient 自动获取 JWT Token - 取消按钮改为中止对话而非发送消息
This commit is contained in:
@ -128,7 +128,15 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
"ic-coder.login",
|
||||
async () => {
|
||||
try {
|
||||
await vscode.authentication.getSession("iccoder", [], { createIfNone: true });
|
||||
// 检查是否有现有 session
|
||||
const existingSession = await vscode.authentication.getSession("iccoder", [], { createIfNone: false });
|
||||
if (existingSession) {
|
||||
// 有旧 session,使用 forceNewSession 强制创建新 session
|
||||
await vscode.authentication.getSession("iccoder", [], { forceNewSession: true });
|
||||
} else {
|
||||
// 没有旧 session,使用 createIfNone 创建新 session
|
||||
await vscode.authentication.getSession("iccoder", [], { createIfNone: true });
|
||||
}
|
||||
} catch (error) {
|
||||
vscode.window.showErrorMessage(`登录失败: ${error}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user