fix(agent): resolve reasoningMode from profile config and session meta

- Read reasoningMode from profile config and storedMeta when not
  explicitly set via options (matching thinkingLevel pattern)
- Skip extractThinking() call when reasoningMode is "off"
- Clean up redundant ?? undefined casts in CLI entry points

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
yushen 2026-02-04 16:00:53 +08:00
parent 953a29672a
commit 8fe2b5f010
5 changed files with 19 additions and 6 deletions

View file

@ -177,7 +177,7 @@ async function main() {
baseUrl: opts.baseUrl,
systemPrompt: opts.system,
thinkingLevel: opts.thinking as any,
reasoningMode: (opts.reasoning as any) ?? undefined,
reasoningMode: opts.reasoning as any,
cwd: opts.cwd,
sessionId: opts.session,
debug: opts.debug,