fix: 修复 showPlan 工具交互逻辑和 JWT Token 问题
- 修复 pendingQuestions 缺失时无法提交回答的问题 - 添加 fallbackTaskId 参数支持直接发送到后端 - apiClient 自动获取 JWT Token - 取消按钮改为中止对话而非发送消息
This commit is contained in:
@ -61,6 +61,20 @@ export class ICCoderAuthenticationProvider
|
||||
scopes: readonly string[]
|
||||
): Promise<vscode.AuthenticationSession> {
|
||||
try {
|
||||
// 先删除旧的 session(静默删除,不弹窗、不重载窗口)
|
||||
if (this._sessions.length > 0) {
|
||||
const oldSession = this._sessions[0];
|
||||
this._sessions = [];
|
||||
await this.saveSessions();
|
||||
await clearUserInfo();
|
||||
this._onDidChangeSessions.fire({
|
||||
added: [],
|
||||
removed: [oldSession],
|
||||
changed: [],
|
||||
});
|
||||
console.log("🔄 已清除旧的 session");
|
||||
}
|
||||
|
||||
const token = await this.login();
|
||||
|
||||
// 获取到 token 后立即调用用户信息接口
|
||||
|
||||
Reference in New Issue
Block a user