✨ feat(vscode): codex 命令统一组装,模型/思考级别可在设置面板配置
新增 cc/codexCommand.ts 作为 codex 调用的唯一出口(buildCodexArgs / buildCodexCommandString),把 exec-review / resume / interactive 三种形态 的 flag 拼装收敛到一处;模型与思考级别作为自由文本项写入全局设置并贯穿 webview 消息通道,空值则不传 -c,沿用 codex config.toml 默认。
This commit is contained in:
@@ -169,6 +169,16 @@ export interface Settings {
|
||||
* (drag to 完成 when PR merge conflicts). Empty = DEFAULT_PROFILE_PATH.
|
||||
*/
|
||||
conflictResolutionProfilePath: string
|
||||
/**
|
||||
* codex 审查会话使用的模型(`-c model=`)。空串 = 不传,用 codex
|
||||
* `config.toml` 默认。
|
||||
*/
|
||||
codexModel: string
|
||||
/**
|
||||
* codex 审查会话的思考级别(`-c model_reasoning_effort=`)。空串 = 不传,
|
||||
* 用 codex 默认。合法值 minimal/low/medium/high/xhigh。
|
||||
*/
|
||||
codexReasoningEffort: string
|
||||
}
|
||||
|
||||
export const SETTINGS_KEY = 'superpowers.settings'
|
||||
@@ -194,6 +204,8 @@ function defaults(ctx: ExtensionContext): Settings {
|
||||
youtrackProjectShortName: '',
|
||||
youtrackCloseCommand: '',
|
||||
conflictResolutionProfilePath: '',
|
||||
codexModel: '',
|
||||
codexReasoningEffort: '',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,6 +290,13 @@ export function getSettings(ctx: ExtensionContext): Settings {
|
||||
const conflictResolutionProfilePath = typeof stored.conflictResolutionProfilePath === 'string'
|
||||
? stored.conflictResolutionProfilePath
|
||||
: base.conflictResolutionProfilePath
|
||||
// codex 模型 / 思考级别:'' 有意义(= 用 codex 默认),不强制回退。
|
||||
const codexModel = typeof stored.codexModel === 'string'
|
||||
? stored.codexModel
|
||||
: base.codexModel
|
||||
const codexReasoningEffort = typeof stored.codexReasoningEffort === 'string'
|
||||
? stored.codexReasoningEffort
|
||||
: base.codexReasoningEffort
|
||||
|
||||
return {
|
||||
webhookPort,
|
||||
@@ -299,6 +318,8 @@ export function getSettings(ctx: ExtensionContext): Settings {
|
||||
youtrackProjectShortName,
|
||||
youtrackCloseCommand,
|
||||
conflictResolutionProfilePath,
|
||||
codexModel,
|
||||
codexReasoningEffort,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user