♻️ refactor(vscode): 工单来源 gitea 改名 forge,激活时把本机按旧名存的记录迁过去

This commit is contained in:
cruldra committed 2026-10-19 08:00:29 +11:00
1 parent 14bee9f505
commit 451bc91a6b
24 files changed
+234 -90

No files matched your search

+6 -1
View File
@@ -9,6 +9,7 @@ import { commands, EventEmitter, window } from 'vscode'
import { initIdentity } from './auth/identity'
import { setProfilesDirOverride } from './cc/profiles'
import { registerCodeReader } from './codeReader'
import { migrateLegacySourceKeys } from './issues/localState'
import { logger } from './logging/logger'
import { CONFIGURE_HANDOFF_STORE_COMMAND, configureHandoffStore } from './oss/handoffStoreSetup'
import { KanbanWebviewPanel } from './panel/KanbanPanel'
@@ -40,6 +41,10 @@ export interface SuperpowersApi {
}
export function activate(context: ExtensionContext): SuperpowersApi {
// 工单来源改名(gitea → forge)前存下的本机记录先挪到新名下,后面读本机状态的地方才认得。
void migrateLegacySourceKeys(context.workspaceState).catch((err: unknown) => {
logger.add({ level: 'error', source: 'settings', message: '本机工单记录迁移失败', details: err instanceof Error ? err.message : String(err) })
})
// Profiles 目录 override 在 panel 未打开时也要生效(list / launch 共用)。
setProfilesDirOverride(getSettings(context).profilesDirectory || undefined)
// 存量提示词先迁到 Handlebars,再让 persistSeededProfiles 在迁移结果上补 seed。
@@ -53,7 +58,7 @@ export function activate(context: ExtensionContext): SuperpowersApi {
context.subscriptions.push(logger, {
dispose: () => { void webhookCoordinator.dispose() },
})
// 状态栏常驻展示当前 Gitea 身份;token 用错人(同步/复制)时第一眼能看出来。
// 状态栏常驻展示当前代码托管仓库的身份;token 用错人(同步/复制)时第一眼能看出来。
void initIdentity(context)
// vscode://clurdra.superpowers-vscode-clurdra/<path> 外部入口:开 cc 会话 tab、从 env 文件配置移交存储。