✨ feat(vscode): 问 AI 和重写注释各用各的 profile,设置里加重写注释默认模型

This commit is contained in:
cruldra committed 2026-10-12 16:30:41 +11:00
1 parent 925f1ed39a
commit b83c445dd0
25 files changed
+363 -111

No files matched your search

+8
View File
@@ -211,7 +211,10 @@ export interface Settings {
defaultTestProfilePath: string
/** 原型会话的默认 Claude profile;工单级「原型配置文件」为空时用它。 */
defaultPrototypeProfilePath: string
/** 代码阅读里问 AI(块下面、预览顶部、「了解一块代码」)的默认 Claude profile;空串时用插件的默认 profile,它也没有就不带 `--settings`。 */
defaultAskProfilePath: string
/** 代码阅读里重写注释的默认 Claude profile;空串时用插件的默认 profile,它也没有就不带 `--settings`。 */
defaultRewriteProfilePath: string
/**
* Claude settings profile path for the conflict-resolution cc session
* (drag to 完成 when PR merge conflicts). Empty = DEFAULT_PROFILE_PATH.
@@ -317,6 +320,7 @@ function defaults(ctx: ExtensionContext): Settings {
defaultTestProfilePath: '',
defaultPrototypeProfilePath: '',
defaultAskProfilePath: '',
defaultRewriteProfilePath: '',
conflictResolutionProfilePath: '',
commitProfilePath: '',
prDiffSummaryProfilePath: '',
@@ -435,6 +439,9 @@ export function getSettings(ctx: ExtensionContext): Settings {
const defaultAskProfilePath = typeof stored.defaultAskProfilePath === 'string'
? stored.defaultAskProfilePath.trim()
: base.defaultAskProfilePath
const defaultRewriteProfilePath = typeof stored.defaultRewriteProfilePath === 'string'
? stored.defaultRewriteProfilePath.trim()
: base.defaultRewriteProfilePath
// conflict-resolution profile: '' is meaningful (= DEFAULT_PROFILE_PATH at
// launch time), so don't coerce. Non-string legacy values collapse to ''.
const conflictResolutionProfilePath = typeof stored.conflictResolutionProfilePath === 'string'
@@ -496,6 +503,7 @@ export function getSettings(ctx: ExtensionContext): Settings {
defaultTestProfilePath,
defaultPrototypeProfilePath,
defaultAskProfilePath,
defaultRewriteProfilePath,
conflictResolutionProfilePath,
commitProfilePath,
prDiffSummaryProfilePath,