* docs: update authentication methods to reflect OAuth discontinuation
Remove deprecated Qwen OAuth references and update documentation to
direct users to valid authentication methods (API Key, Coding Plan,
or Local Inference) following the OAuth free tier discontinuation on
2026-04-15.
Closes#3316
* docs: fix quickstart auth description to match actual /auth UI
The /auth command shows three options: Alibaba Cloud Coding Plan,
API Key, and Qwen OAuth (discontinued). Updated quickstart.md to
accurately reflect this UI instead of splitting into Option A/B/C.
Also updated settings.md, commands.md, and troubleshooting.md with
minor OAuth-related cleanups.
* docs: update .qwen workspace description in quickstart
Remove reference to 'Qwen account' since OAuth is discontinued.
The .qwen directory is created by Qwen Code itself for storing
credentials, configuration, and session data.
* docs: fix warning block formatting in quickstart
- Add missing '>' continuation for the OAuth discontinuation warning block
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* docs: update README Qwen3.6-Plus description
- Remove mention of running Qwen3.6-Plus locally via Ollama/vLLM
- Keep only the Alibaba Cloud ModelStudio API key option
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* docs: address review feedback - remove Local Inference from auth, add dual-region links
- Local Inference removed from auth method lists, kept as separate
'Local Model Setup' section with detailed Ollama/vLLM config examples
- All links now provide dual-region URLs (Beijing + intl)
- .qwen workspace note restored to original meaning (cost tracking)
- Device auth flow error kept scoped to legacy OAuth
- API setup guide links updated with confirmed intl URL
---------
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* docs: add auto-memory implementation log
* feat(core): add managed auto-memory storage scaffold
* feat(core): load managed auto-memory index
* feat(core): add managed auto-memory recall
* feat(core): add managed auto-memory extraction
* feat(cli): add managed auto-memory dream commands
* feat(core): add auxiliary side-query foundation
* feat(memory): add model-driven recall selection
* feat(memory): add model-driven extraction planner
* feat(core): add background task runtime foundation
* feat(memory): schedule auto dream in background
* feat(core): add background agent runner foundation
* feat(memory): add extraction agent planner
* feat(core): add dream agent planner
* feat(core): rebuild managed memory index
* feat(memory): add governance status commands
* feat(memory): add managed forget flow
* feat(core): harden background agent planning
* feat(memory): complete managed parity closure
* test(memory): add managed lifecycle integration coverage
* feat: same to cc
* feat(memory-ui): add memory saved notification and memory count badge
Feature 3 - Memory Saved Notification:
- Add HistoryItemMemorySaved type to types.ts
- Create MemorySavedMessage component for rendering '● Saved/Updated N memories'
- In useGeminiStream: detect in-turn memory writes via mapToDisplay's
memoryWriteCount field and emit 'memory_saved' history item after turn
- In client.ts: capture background dream/extract promises and expose
via consumePendingMemoryTaskPromises(); useGeminiStream listens
post-turn and emits 'Updated N memories' notification for background tasks
Feature 4 - Memory Count Badge:
- Add isMemoryOp field to IndividualToolCallDisplay
- Add memoryWriteCount/memoryReadCount to HistoryItemToolGroup
- Add detectMemoryOp() in useReactToolScheduler using isAutoMemPath
- ToolGroupMessage renders '● Recalled N memories, Wrote N memories' badge
at the top of tool groups that touch memory files
Fix: process.env bracket-access in paths.ts (noPropertyAccessFromIndexSignature)
Fix: MemoryDialog.test.tsx mock useSettings to satisfy SettingsProvider requirement
* fix(memory-ui): auto-approve memory writes, collapse memory tool groups, fix MEMORY.md path
Problem 1 - Auto-approve memory file operations:
- write-file.ts: getDefaultPermission() checks isAutoMemPath; returns 'allow'
for managed auto-memory files, 'ask' for all other files
- edit.ts: same pattern
Problem 2 - Feature 4 UX: collapse memory-only tool groups:
- ToolGroupMessage: detect when all tool calls have isMemoryOp set (pure memory
group) and all are complete; render compact '● Recalled/Wrote N memories
(ctrl+o to expand)' instead of individual tool call rows
- ctrl+o toggles expand/collapse when isFocused and group is memory-only
- Mixed groups (memory + other tools) keep badge-at-top behaviour
- Expanded state shows individual tool calls with '● Memory operations
(ctrl+o to collapse)' header
Problem 3 - MEMORY.md path mismatch:
- prompt.ts: Step 2 now references full absolute path ${memoryDir}/MEMORY.md
so the model writes to the correct location inside the memory directory,
not to the parent project directory
Fix tests:
- write-file.test.ts: add getProjectRoot to mockConfigInternal
- prompt.test.ts: update assertion to match full-path section header
* fix(memory-ui): fix duplicate notification, broken ctrl+o, and Edit tool detection
- Remove duplicate 'Saved N memories' notification: the tool group badge already
shows 'Wrote N memories'; the separate HistoryItemMemorySaved addItem after
onComplete was double-counting. Keep only the background-task path
(consumePendingMemoryTaskPromises).
- Remove ctrl+o expand: Ink's Static area freezes items on first render and
cannot respond to user input. useInput/useState(isExpanded) in a Static item
is a no-op. Removed the dead code; memory-only groups now always render as
the compact summary (no fake interactive hint).
- Fix Edit tool detection: detectMemoryOp was checking for 'edit_file' but the
real tool name constant is 'edit'. Also removed non-existent 'create_file'
(write_file covers all writes). Now editing MEMORY.md is correctly identified
as a memory write op, collapses to 'Wrote N memories', and is auto-approved.
* fix(dream): run /dream as a visible submit_prompt turn, not a silent background agent
The previous implementation ran an AgentHeadless background agent that could
take 5+ minutes with zero UI feedback — user saw a blank screen for the entire
duration and then at most one line of text.
Fix: /dream now returns submit_prompt with the consolidation task prompt so it
runs as a regular AI conversation turn. Tool calls (read_file, write_file, edit,
grep_search, list_directory, glob) are immediately visible as collapsed tool
groups as the model works through the memory files — identical UX to Claude Code.
Also export buildConsolidationTaskPrompt from dreamAgentPlanner so dreamCommand
can reuse the same detailed consolidation prompt that was already written.
* fix(memory): auto-allow ls/glob/grep on memory base directory
Add getMemoryBaseDir() to getDefaultPermission() allow list in ls.ts,
glob.ts, and grep.ts — mirrors the existing pattern in read-file.ts.
Without this, ListFiles/Glob/Grep on ~/.qwen/* would trigger an
approval dialog, blocking /dream at its very first step.
* fix(background): prevent permission prompt hangs in background agents
Match Claude Code's headless-agent intent: background memory agents must never
block on interactive permission prompts.
Wrap background runtime config so getApprovalMode() returns YOLO, ensuring any
ask decision is auto-approved instead of hanging forever. Add regression test
covering the wrapped approval mode.
* fix(memory): run auto extract through forked agent
Make managed auto-memory extraction follow the Claude Code architecture:
background extraction now uses a forked agent to read/write memory files
directly, instead of planning patches and applying them with a separate
filesystem pipeline.
Keep the old patch/model path only as fallback if the forked agent fails.
Add regression tests covering the new execution path and tool whitelist.
* refactor(memory): remove legacy extract fallback pipeline
Delete the old patch/model/heuristic extraction path entirely.
Managed auto-memory extract now runs only through the forked-agent
execution flow, with no planner/apply fallback stages remaining.
Also remove obsolete exports/tests and update scheduler/integration
coverage to use the forked-agent-only architecture.
* refactor(memory): move auxiliary files out of memory/ directory
meta.json, extract-cursor.json, and consolidation.lock are internal
bookkeeping files, not user-visible memories. Move them one level up
to the project state dir (parent of memory/) so that the memory/
directory contains only MEMORY.md and topic files, matching the
clean layout of the upstream reference implementation.
Add getAutoMemoryProjectStateDir() helper in paths.ts and update the
three path accessors + store.test.ts path assertions accordingly.
* fix(memory): record lastDreamAt after manual /dream run
The /dream command submits a prompt to the main agent (submit_prompt),
which writes memory files directly. Because it bypasses dreamScheduler,
meta.json was never updated and /memory always showed 'never'.
Fix by:
- Exporting writeDreamManualRunToMetadata() from dream.ts
- Adding optional onComplete callback to SubmitPromptActionReturn and
SubmitPromptResult (types.ts / commands/types.ts)
- Propagating onComplete through slashCommandProcessor.ts
- Firing onComplete after turn completion in useGeminiStream.ts
- Providing the callback in dreamCommand.ts to write lastDreamAt
* fix(memory): remove scope params from /remember in managed auto-memory mode
--global/--project are legacy save_memory tool concepts. In managed
auto-memory mode the forked agent decides the appropriate type
(user/feedback/project/reference) based on the content of the fact.
Also improve the prompt wording to explicitly ask the agent to choose
the correct type, reducing the tendency to default to 'project'.
* feat(ui): show '✦ dreaming' indicator in footer during background dream
Subscribe to getManagedAutoMemoryDreamTaskRegistry() in Footer via a
useDreamRunning() hook. While any dream task for the current project is
pending or running, display '✦ dreaming' in the right section of the
footer bar, between Debug Mode and context usage.
* refactor(memory): align dream/extract infrastructure with Claude Code patterns
Five improvements based on Claude Code parity audit:
1. Memoize getAutoMemoryRoot (paths.ts)
- Add _autoMemoryRootCache Map, keyed by projectRoot
- findCanonicalGitRoot() walks the filesystem per call; memoize avoids
repeated git-tree traversal on hot-path schedulers/scanners
- Expose clearAutoMemoryRootCache() for test teardown
2. Lock file stores PID + isProcessRunning reclaim (dreamScheduler.ts)
- acquireDreamLock() writes process.pid to the lock file body
- lockExists() reads PID and calls process.kill(pid, 0); dead/missing
PID reclaims the lock immediately instead of waiting 2h
- Stale threshold reduced to 1h (PID-reuse guard, same as CC)
3. Session scan throttle (dreamScheduler.ts)
- Add SESSION_SCAN_INTERVAL_MS = 10min (same as CC)
- Add lastSessionScanAt Map<projectRoot, number> to ManagedAutoMemoryDreamRuntime
- When time-gate passes but session-gate doesn't, throttle prevents
re-scanning the filesystem on every user turn
4. mtime-based session counting (dreamScheduler.ts)
- Replace fragile recentSessionIdsSinceDream Set in meta.json with
filesystem mtime scan (listSessionsTouchedSince)
- Mirrors Claude Code's listSessionsTouchedSince: reads session JSONL
files from Storage.getProjectDir()/chats/, filters by mtime > lastDreamAt
- Immune to meta.json corruption/loss; no per-turn metadata write
- ManagedAutoMemoryDreamRuntime accepts injectable SessionScannerFn
for clean unit testing without real session files
5. Extraction mutual exclusion extended to write_file/edit (extractScheduler.ts)
- historySliceUsesMemoryTool() now checks write_file/edit/replace/create_file
tool calls whose file_path is within isAutoMemPath()
- Previously only detected save_memory; missed direct file writes by
the main agent, causing redundant background extraction
* docs(memory): add user-facing memory docs, i18n for all locales, simplify /forget
- Add docs/users/features/memory.md: comprehensive user-facing guide covering
QWEN.md instructions, auto-memory behaviour, all memory commands, and
troubleshooting; replaces the placeholder auto-memory.md
- Update docs/users/features/_meta.ts: rename entry auto-memory → memory
- Update docs/users/features/commands.md: add /init, /remember, /forget,
/dream rows; fix /memory description; remove /init duplicate
- Update docs/users/configuration/settings.md: add memory.* settings section
(enableManagedAutoMemory, enableManagedAutoDream) between tools and permissions
- Remove /forget --apply flag: preview-then-apply flow replaced with direct
deletion; update forgetCommand.ts, en.js, zh.js accordingly
- Add all auto-memory i18n keys to de, ja, pt, ru locales (18 keys each):
Open auto-memory folder, Auto-memory/Auto-dream status lines, never/on/off,
✦ dreaming, /forget and /remember usage strings, all managed-memory messages
- Remove dead save_memory branch from extractScheduler.partWritesToMemory()
- Add ✦ dreaming indicator to Footer.tsx with i18n; fix Footer.test.tsx mocks
- Refactor MemoryDialog.tsx auto-dream status line to use i18n
- Remove save_memory tool (memoryTool.ts/test); clean up webui references
- Add extractionPlanner.ts, const.ts and associated tests
- Delete stale docs/users/configuration/memory.md and
docs/developers/tools/memory.md (content superseded)
* refactor(memory): remove all Claude Code references from comments and test names
* test(memory): remove empty placeholder test files that cause vitest to fail
* fix eslint
* fix test in windows
* fix test
* fix(memory): address critical review findings from PR #3087
- fix(read-file): narrow auto-allow from getMemoryBaseDir() (~/.qwen) to
isAutoMemPath(projectRoot) to prevent exposing settings.json / OAuth
credentials without user approval (wenshao review)
- fix(forget): per-entry deletion instead of whole-file unlink
- assign stable per-entry IDs (relativePath:index for multi-entry files)
so the model can target individual entries without removing siblings
- rewrite file keeping unmatched entries; only unlink when file becomes
empty (wenshao review)
- fix(entries): round-trip correctness for multi-entry new-format bodies
- parseAutoMemoryEntries: plain-text line closes current entry and opens
a new one (was silently ignored when current was already set)
- renderAutoMemoryBody: emit blank line between adjacent entries so the
parser can detect entry boundaries on re-read (wenshao review)
- fix(entries): resolve two CodeQL polynomial-regex alerts
- indentedMatch: \s{2,}(?:[-*]\s+)? → [\t ]{2,}(?:[-*][\t ]+)?
- topLevelMatch: :\s*(.+)$ → :[ \t]*(\S.*)$
(github-advanced-security review)
- fix(scan.test): use forward-slash literal for relativePath expectation
since listMarkdownFiles() normalises all separators to '/' on all
platforms including Windows
* fix(memory): replace isAutoMemPath startsWith with path.relative()
Using path.relative() instead of string startsWith() is more robust
across platforms — it correctly handles Windows path-separator
differences and avoids potential edge cases where a path prefix match
could succeed on non-separator boundaries.
Addresses github-actions review item 3 (PR #3087).
* feat(telemetry): add auto-memory telemetry instrumentation
Add OpenTelemetry logs + metrics for the five auto-memory lifecycle
events: extract, dream, recall, forget, and remember.
Telemetry layer (packages/core/src/telemetry/):
- constants.ts: 5 new event-name constants
(qwen-code.memory.{extract,dream,recall,forget,remember})
- types.ts: 5 new event classes with typed constructor params
(MemoryExtractEvent, MemoryDreamEvent, MemoryRecallEvent,
MemoryForgetEvent, MemoryRememberEvent)
- metrics.ts: 8 new OTel instruments (5 Counters + 3 Histograms)
with recordMemoryXxx() helpers; registered inside initializeMetrics()
- loggers.ts: logMemoryExtract/Dream/Recall/Forget/Remember() — each
emits a structured log record and calls its recordXxx() counterpart
- index.ts: re-exports all new symbols
Instrumentation call-sites:
- extractScheduler.ts ManagedAutoMemoryExtractRuntime.runTask():
emits extract event with trigger=auto, completed/failed status,
patches_count, touched_topics, and wall-clock duration
- dream.ts runManagedAutoMemoryDream():
emits dream event with trigger=auto, updated/noop status,
deduped_entries, touched_topics, and duration; covers both
agent-planner and mechanical fallback paths
- recall.ts resolveRelevantAutoMemoryPromptForQuery():
emits recall event with strategy, docs_scanned/selected, and
duration; covers model, heuristic, and none paths
- forget.ts forgetManagedAutoMemoryEntries():
emits forget event with removed_entries_count, touched_topics,
and selection_strategy (model/heuristic/none)
- rememberCommand.ts action():
emits remember event with topic=managed|legacy at command
invocation time (before agent decides the actual memory type)
* refactor(telemetry): remove memory forget/remember telemetry events
Remove EVENT_MEMORY_FORGET and EVENT_MEMORY_REMEMBER along with all
associated infrastructure that is no longer needed:
- constants.ts: remove EVENT_MEMORY_FORGET, EVENT_MEMORY_REMEMBER
- types.ts: remove MemoryForgetEvent, MemoryRememberEvent classes
- metrics.ts: remove MEMORY_FORGET_COUNT, MEMORY_REMEMBER_COUNT constants,
memoryForgetCounter, memoryRememberCounter module vars,
their initialization in initializeMetrics(), and
recordMemoryForgetMetrics(), recordMemoryRememberMetrics() functions
- loggers.ts: remove logMemoryForget(), logMemoryRemember() functions
and their imports
- index.ts: remove all re-exports for the above symbols
- memory/forget.ts: remove logMemoryForget call-site and import
- cli/rememberCommand.ts: remove logMemoryRemember call-sites and import
* change default value
* fix forked agent
* refactor(background): unify fork primitives into runForkedAgent + cleanup
- Merge runForkedQuery into runForkedAgent via TypeScript overloads:
with cacheSafeParams → GeminiChat single-turn path (ForkedQueryResult)
without cacheSafeParams → AgentHeadless multi-turn path (ForkedAgentResult)
- Delete forkedQuery.ts; move its test to background/forkedAgent.cache.test.ts
- Remove forkedQuery export from followup/index.ts
- Migrate all callers (suggestionGenerator, speculation, btwCommand, client)
to import from background/forkedAgent
- Add getFastModel() / setFastModel() to Config; expose in CLI config init
and ModelDialog / modelCommand
- Remove resolveFastModel() from AppContainer — now delegated to config.getFastModel()
- Strip Claude Code references from code comments
* fix(memory): address wenshao's critical review findings
- dream.ts: writeDreamManualRunToMetadata now persists lastDreamSessionId
and resets recentSessionIdsSinceDream, preventing auto-dream from firing
again in the same session after a manual /dream
- config.ts: gate managed auto-memory injection on getManagedAutoMemoryEnabled();
when disabled, previously saved memories are no longer injected into new sessions
- rememberCommand.ts: remove legacy save_memory branch (tool was removed);
fall back to submit_prompt directing agent to write to QWEN.md instead
- BuiltinCommandLoader.ts: only register /dream and /forget when managed
auto-memory is enabled, matching the feature's runtime availability
- forget.ts: return early in forgetManagedAutoMemoryMatches when matches is
empty, avoiding unnecessary directory scaffolding as a side effect
* fix test
* fix ci test
* feat(memory): align extract/dream agents to Claude Code patterns
- fix(client): move saveCacheSafeParams before early-return paths so
extract agents always have cache params available (fixes extract never
triggering in skipNextSpeakerCheck mode)
- feat(extract): add read-only shell tool + memory-scoped write
permissions; create inline createMemoryScopedAgentConfig() with
PermissionManager wrapper (isToolEnabled + evaluate) that allows only
read-only shell commands and write/edit within the auto-memory dir
- feat(extract): align prompt to Claude Code patterns — manifest block
listing existing files, parallel read-then-write strategy, two-step
save (memory file then index)
- feat(dream): remove mechanical fallback; runManagedAutoMemoryDream is
now agent-only and throws without config
- feat(dream): align prompt to Claude Code 4-phase structure
(Orient/Gather/Consolidate/Prune+Index); add narrow transcript grep,
relative→absolute date conversion, stale index pruning, index size cap
- fix(permissions): add isToolEnabled() to MemoryScopedPermissionManager
to prevent TypeError crash in CoreToolScheduler._schedule
- test: update dreamScheduler tests to mock dream.js; replace removed
mechanical-dedup test with scheduler infrastructure verification
* move doc to design
* refactor(memory): unify extract+dream background task management into MemoryBackgroundTaskHub
- Add memoryTaskHub.ts: single BackgroundTaskRegistry + BackgroundTaskDrainer shared
by all memory background tasks; exposes listExtractTasks() / listDreamTasks()
typed query helpers and a unified drain() method
- extractScheduler: ManagedAutoMemoryExtractRuntime accepts hub via constructor
(defaults to defaultMemoryTaskHub); test factory gets isolated fresh hub
- dreamScheduler: same pattern — sessionScanner + hub injection; BackgroundTask-
Scheduler initialized from injected hub; test factory gets isolated hub
- status.ts: replace two separate getRegistry() calls with defaultMemoryTaskHub
typed query methods
- Footer.tsx (useDreamRunning): subscribe to shared registry, filter by
DREAM_TASK_TYPE so extract tasks do not trigger the dream spinner
- index.ts: re-export memoryTaskHub.ts so defaultMemoryTaskHub/DREAM_TASK_TYPE/
EXTRACT_TASK_TYPE are available as top-level package exports
* refactor(background): introduce general-purpose BackgroundTaskHub
Replace memory-specific MemoryBackgroundTaskHub with a domain-agnostic
BackgroundTaskHub in the background/ layer. Any future background task
runtime (3rd, 4th, …) plugs in by accepting a hub via constructor
injection — no new infrastructure required.
Changes:
- Add background/taskHub.ts: BackgroundTaskHub (registry + drainer +
createScheduler() + listByType(taskType, projectRoot?)) and the
globalBackgroundTaskHub singleton. Zero knowledge of any task type.
- Delete memory/memoryTaskHub.ts: its narrow listExtractTasks /
listDreamTasks helpers are replaced by the generic listByType() call.
- Move EXTRACT_TASK_TYPE to extractScheduler.ts (owned by the runtime
that defines it); replace 3 hardcoded string literals with the const.
- Move DREAM_TASK_TYPE to dreamScheduler.ts; use hub.createScheduler()
instead of manually wiring new BackgroundTaskScheduler(reg, drain).
- status.ts: globalBackgroundTaskHub.listByType(EXTRACT_TASK_TYPE, ...)
- Footer.tsx: globalBackgroundTaskHub.registry (shared, filtered by type)
- index.ts: export background/taskHub.js; drop memory/memoryTaskHub.js
* test(background): add BackgroundTaskHub unit tests and hub isolation checks
- background/taskHub.test.ts (11 tests):
- createScheduler(): tasks registered via scheduler appear in hub registry;
multiple calls return distinct scheduler instances
- listByType(): filters by taskType, filters by projectRoot, returns []
for unknown types, two types co-exist in registry but stay separated
- drain(): resolves false on timeout, resolves true when tasks complete,
resolves true immediately when no tasks in flight
- isolation: tasks in hubA do not appear in hubB
- globalBackgroundTaskHub: is a BackgroundTaskHub instance with registry/drainer
- extractScheduler.test.ts (+1 test):
- factory-created runtimes have isolated registries; tasks in runtimeA
are invisible to runtimeB; all tasks carry EXTRACT_TASK_TYPE
- dreamScheduler.test.ts (+1 test):
- factory-created runtimes have isolated registries; tasks in runtimeA
are invisible to runtimeB; all tasks carry DREAM_TASK_TYPE
* refactor(memory): consolidate all memory state into MemoryManager
Replace BackgroundTaskRegistry/Drainer/Scheduler/Hub helper classes and
module-level globals with a single MemoryManager class owned by Config.
## Changes
### New
- packages/core/src/memory/manager.ts — MemoryManager with:
- scheduleExtract / scheduleDream (inline queuing + deduplication logic)
- recall / forget / selectForgetCandidates / forgetMatches
- getStatus / drain / appendToUserMemory
- subscribe(listener) compatible with useSyncExternalStore
- storeWith() atomic record registration (no double-notify)
- Distinct skippedReason 'scan_throttled' vs 'min_sessions' for dream
- packages/core/src/utils/forkedAgent.ts — pure cache util (moved from background/)
- packages/core/src/utils/sideQuery.ts — pure util (moved from auxiliary/)
### Deleted
- background/taskRegistry, taskDrainer, taskScheduler, taskHub and all tests
- background/forkedAgent (moved to utils/)
- auxiliary/sideQuery (moved to utils/)
- memory/extractScheduler, dreamScheduler, state and all tests
### Modified
- config/config.ts — Config owns MemoryManager instance; getMemoryManager()
- core/client.ts — all memory ops via config.getMemoryManager()
- core/client.test.ts — mock MemoryManager instead of individual modules
- memory/status.ts — accepts MemoryManager param, drops globalBackgroundTaskHub
- index.ts — memory exports reduced from 14 modules to 5 (manager/types/paths/store/const)
- cli/commands/dreamCommand.ts — via config.getMemoryManager()
- cli/commands/forgetCommand.ts — via config.getMemoryManager()
- cli/components/Footer.tsx — useSyncExternalStore replacing setInterval polling
- cli/components/Footer.test.tsx — add getMemoryManager mock
* fix(cli): remember "Start new chat session" until summary changes
Persist a project-scoped Welcome Back restart choice keyed to the
current PROJECT_SUMMARY fingerprint.
This suppresses the Welcome Back dialog after choosing "Start new chat
session", while still showing it again after the project summary is
updated.
* fix conflict
* feat: optimize compact mode UX — shortcuts, settings sync, and safety improvements
- Add Ctrl+O to keyboard shortcuts list (?) and /help command
- Sync compact mode toggle from Settings dialog with CompactModeContext
- Protect tool approval prompts from being hidden in compact mode
(MainContent forces live rendering during WaitingForConfirmation)
- Remove snapshot freezing on toggle — treat as persistent preference,
not temporary peek (differs from Claude Code's session-scoped model)
- Add compact mode tip to startup Tips rotation for non-intrusive discovery
- Remove compact mode indicator from footer to reduce UI clutter
- Add competitive analysis design doc (EN + ZH) comparing with Claude Code
- Update user docs (settings.md) and i18n translations (en/zh/ru/pt)
Relates to #3047, #2767, #2770
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: remove frozenSnapshot dead code and Chinese design doc
- Remove frozenSnapshot state, useEffect, and all related logic from
AppContainer, MainContent, CompactModeContext, and test files
- Simplify MainContent to always render live pendingHistoryItems
- Delete compact-mode-design-zh.md (redundant Chinese translation)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address PR review feedback for compact mode optimization
- Add refreshStatic() call after setCompactMode in SettingsDialog
so already-rendered Static history updates immediately
- Fix outdated column split comment in KeyboardShortcuts (5+4+4)
- Update design doc: remove all frozenSnapshot references, renumber
optimization recommendations, fix file reference descriptions
- Add missing i18n keys for de.js and ja.js locales
- Add test for SettingsDialog compact mode sync with CompactModeContext
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: prevent subagent confirmation from being hidden in compact mode
hasConfirmingTool only checks ToolCallStatus.Confirming, but subagent
approvals arrive via resultDisplay.pendingConfirmation while the tool
status remains Executing. Add hasSubagentPendingConfirmation to the
showCompact guard so tool groups with pending subagent confirmations
are always force-expanded.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: force show subagent confirmation result in compact mode
The previous fix (47ee03c) correctly force-expanded the tool group
wrapper when a subagent had pending confirmation, but each inner
ToolMessage still hid its resultDisplay due to compactMode check,
which hid the AgentExecutionDisplay containing the inline confirmation
UI.
Add isAgentWithPendingConfirmation to forceShowResult conditions so
the inner AgentExecutionDisplay is rendered even in compact mode.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(compact-mode): merge consecutive tool groups across hidden items
In compact mode, sequential tool calls across multiple LLM turns each
produced a separate bordered box, defeating the "compact" intent. The
model typically emits a `gemini_thought` between consecutive tool calls,
which is hidden in compact mode — so visually the boxes look adjacent,
but in `history` they are separated by hidden items.
This commit adds render-time merging of consecutive tool_group history
items, where "consecutive" allows hidden-in-compact items
(`gemini_thought`, `gemini_thought_content`) between them.
Key pieces:
- New `mergeCompactToolGroups` utility that merges adjacent mergeable
tool_groups, skipping hidden items between them. Force-expand
conditions (Confirming/Error tools, subagent pending confirmation,
user-initiated, focused embedded shell) preserve group boundaries so
authorization prompts, errors, and shell focus stay visible.
- `MainContent.tsx` applies the merger only when `compactMode === true`
(verbose mode is unchanged) and calls `refreshStatic()` when a merge
consolidates items, because Ink's `<Static>` is append-only and
cannot replace already-committed terminal content.
- `CompactToolGroupDisplay.tsx` shows a `× N` count when a merged
group contains more than one tool, matching the existing single-turn
multi-tool display style.
- 19 unit tests covering empty/single/multiple groups, hidden-item
skipping (the 8-tool real-world scenario), force-expand boundaries,
mixed tool types, and complex sequences.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: 秦奇 <gary.gq@alibaba-inc.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(auth): discontinue Qwen OAuth free tier (2026-04-15 cutoff)
The Qwen OAuth free tier has reached its end-of-life date. This updates
all client-side messaging, blocks new OAuth signups, and guides existing
users to alternative providers.
* fix(test): add getModelsConfig mock and update QWEN_OAUTH test expectations
- Add getModelsConfig() to Config mocks in gemini.test.tsx (3 failures)
- Update validateNonInterActiveAuth test to expect exit for QWEN_OAUTH
since validateAuthMethod now returns an error for discontinued free tier
feat(cli): add startup performance profiler (#3219)
Add a lightweight startup profiler activated via QWEN_CODE_PROFILE_STARTUP=1.
When enabled, collects performance.now() timestamps at 7 key phases in main()
and writes a JSON report to ~/.qwen/startup-perf/. Also records
process.uptime() at T0 to capture module loading time not covered by
checkpoint-based measurement.
Key design decisions:
- Only profiles inside sandbox child process to avoid duplicate reports
- initStartupProfiler() is idempotent (resets state on each call)
- Filename uses report.sessionId for consistency with JSON content
- Zero overhead when disabled (single env var check)
Initial measurement: module loading ~1342ms (94%), main() ~85ms (6%),
confirming barrel exports and eager dependency loading as primary
optimization targets for #3011.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* docs: update quota exceeded alternatives to OpenRouter and Fireworks
- Update README.md news section to recommend OpenRouter and Fireworks
as primary alternatives, with ModelStudio as third option
- Update retry.ts quota error message to include OpenRouter and
Fireworks URLs for users whose OAuth quota has been exhausted
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* fix(test): update retry test assertions to match new quota error message
* docs: update free tier quota to 100 req/day with sunset notice and alternatives
Update all references to reflect the Qwen OAuth free tier policy change:
- 1,000 → 100 requests/day across code, i18n, and docs
- Add 2026-04-15 sunset date everywhere
- Guide users to OpenRouter, Fireworks AI, or ModelStudio in docs
- Remove CHANGELOG.md
---------
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: tanzhenxin <tanzhenxing1987@gmail.com>
* feat(core): add microcompaction for idle context cleanup
Clear old tool result content from chat history when the user returns
after an idle period (default 60 min). Replaces functionResponse output
with a sentinel string for compactable tools (read_file, shell, grep,
glob, web_fetch, web_search, edit, write_file), keeping the N most
recent results intact (default 5). Runs before full compression so it
can shed tokens cheaply without an API call.
- Time-based trigger reuses lastApiCompletionTimestamp from thinking cleanup
- Per-part counting so keepRecent applies to individual tool results
even when batched in parallel
- Preserves tool error responses (only clears successful outputs)
- Configurable via settings.json (context.microcompaction) with env var
overrides for E2E testing
- Enabled by default
* refactor(config): unify idle cleanup settings under clearContextOnIdle
Consolidate thinking block cleanup and tool results microcompaction
config into a single `context.clearContextOnIdle` settings group:
{
"context": {
"clearContextOnIdle": {
"thinkingThresholdMinutes": 5,
"toolResultsThresholdMinutes": 60,
"toolResultsNumToKeep": 5
}
}
}
- Use -1 on either threshold to disable that cleanup (no enabled bool)
- Remove separate `microcompaction` and `gapThresholdMinutes` settings
- Thinking cleanup: 5 min default (unchanged)
- Tool results cleanup: 60 min default
- Preserve tool error responses (only clear successful outputs)
* feat(vscode-ide-companion): add clearContextOnIdle settings configuration
- Add gapThresholdMinutes settings for thinking blocks, tool results, and retention count
- Remove deprecated gapThresholdMinutes from root settings level
This reorganizes the context clearing settings into a dedicated clearContextOnIdle object with configurable thresholds for thinking blocks and tool results.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* fix(core): restrict microcompaction to user-initiated messages only
Move microcompactHistory() inside the UserQuery/Cron guard so model
latency during tool-call loops doesn't count as user idle time.
* docs: update settings docs for clearContextOnIdle config rename
Replace stale `context.gapThresholdMinutes` entry with the new
`context.clearContextOnIdle.*` settings group introduced in the
microcompaction feature.
* fix(core): address review comments on microcompaction PR
- Guard against NaN in toolResultsNumToKeep with Number.isFinite()
- Report effective keepRecent (after Math.max) in meta, not raw config
- Fix comment to mention cron messages alongside user messages
---------
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* feat(subagents): add disallowedTools field to agent definitions
Add a `disallowedTools` blocklist to agent frontmatter, letting agents
specify tools they should not have access to. Supports exact tool names,
MCP server-level patterns (e.g., `mcp__slack`), and display name aliases.
Applied as a post-filter in AgentCore.prepareTools() after the existing
`tools` allowlist. Persisted through serialize/parse roundtrips.
* docs: document disallowedTools and MCP tool behavior for subagents
Add Tool Configuration section to sub-agents docs explaining:
- tools allowlist and disallowedTools blocklist
- How MCP tools follow the same allowlist/blocklist rules
- MCP server-level patterns in disallowedTools
* fix(subagents): validate disallowedTools in SubagentValidator
Reuse the existing validateTools() method to validate disallowedTools
entries at config validation time, catching non-string and empty entries
before they reach runtime.
* test: remove flaky BaseSelectionList scroll test on Windows
* feat: add contextual tips system with post-response context awareness
Add a context-aware tips system that proactively shows helpful tips based
on session state. Post-response tips warn when context usage exceeds 80%
or 95%, suggesting /compress. Startup tips rotate across sessions via LRU
scheduling with cross-session persistence (~/.qwen/tip_history.json).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: use value import for runtime values in useContextualTips
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address PR review feedback
- Use lastSessionTimestamp instead of totalShown for cross-session LRU
- Move getTipHistory singleton from Tips.tsx to services/tips/index.ts
- Defer TipHistory.load() when hideTips is true (no side effects)
- Use os.tmpdir() in tests for cross-platform portability
- Add proper translations for de/ja/pt/ru locale files
- Accept TipHistory | null in useContextualTips
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address Copilot review feedback
- Validate tips field type in TipHistory.load() to handle corrupted JSON
- Split approval-mode tip into platform-specific variants using ctx.platform
- Add afterEach cleanup for temp files in all test suites
- Guard useContextualTips against null tipHistory
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: import shared DEFAULT_TOKEN_LIMIT, harden tipHistory, set file permissions
- Import DEFAULT_TOKEN_LIMIT from @qwen-code/qwen-code-core instead of
hardcoding 1_048_576 in tipRegistry.ts and useContextualTips.ts
- Add normalizeEntry() to defensively handle corrupted tip history entries
- Write tip_history.json with mode 0o600 for privacy on multi-user systems
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: remove unused compressionThreshold from TipContext
compressionThreshold was defined in TipContext but never used by any tip's
isRelevant check. Remove it to avoid misleading consumers into thinking
tips respect the user's compression settings.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: sanitize sessionCount and getLastShown against corrupted tip history
- Validate sessionCount is finite and non-negative in TipHistory.load()
- Use normalizeEntry() in getLastShown() for corrupted lastSessionTimestamp
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: add contextual tips user documentation
Add docs/users/features/tips.md covering startup tips, post-response
context warnings, tip history persistence, and the hideTips setting.
Update settings.md description and register the new page in _meta.ts.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace vague "background tasks" with specific "prompt suggestions and speculative
execution" in the --fast flag description across all i18n locales, docs, and VS Code
schema. Update example model name from qwen3.5-flash to qwen3-coder-flash. Also fix
completion logic to require a non-empty partial arg before suggesting --fast, preventing
Tab+Enter from accidentally entering fast model mode.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The "Compact Mode" label is more intuitive than "Verbose Mode" for users,
as it directly describes the default compact view experience. This change
inverts the boolean semantics (compactMode=false means show full output)
and exposes the setting in the /settings dialog (showInDialog: true).
- Rename ui.verboseMode → ui.compactMode with inverted default (false)
- Rename VerboseModeContext → CompactModeContext (file and exports)
- Rename TOGGLE_VERBOSE_MODE → TOGGLE_COMPACT_MODE in key bindings
- Update all consumer components with inverted logic
- Update i18n keys across 6 locales (verbose → compact)
- Update VS Code settings schema
- Add ui.compactMode documentation to settings.md
- Fix Ctrl+O description in keyboard-shortcuts.md
- Update architecture diagram to show status line in footer left
section instead of separate row below
- Document 1-row (default mode) and 2-row (non-default mode) layouts
- Note suppressHint behavior and truncation
- Update settings reference description
* feat(core): adaptive output token escalation (8K default + 64K retry)
99% of model responses are under 5K tokens, but we previously reserved
32K for every request. This wastes GPU slot capacity by ~4x.
Now the default output limit is 8K. When a response hits this cap
(stop_reason=max_tokens), it automatically retries once at 64K — only
the ~1% of requests that actually need more tokens pay the cost.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: add design doc and user doc for adaptive output token escalation
- Add design doc covering problem, architecture, token limit
determination, escalation mechanism, and design decisions
- Document QWEN_CODE_MAX_OUTPUT_TOKENS env var in settings.md
- Add max_tokens adaptive behavior explanation in model config section
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Align with observed provider prompt-cache TTL (~5 min). Add
`context.gapThresholdMinutes` setting so users can tune the threshold
for providers with different cache TTLs.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(cli, webui): add follow-up suggestions feature
Implement context-aware follow-up suggestions that appear after task
completion, suggesting relevant next actions like "commit this", "run
tests", etc.
- Add `followup/` module with types, generator, and rule-based provider
- Export follow-up types and functions from core index
- 8 default suggestion rules covering common workflows
- Add `useFollowupSuggestionsCLI` hook for Ink/React
- Integrate suggestion generation in AppContainer when streaming completes
- Add Tab key to accept, arrow keys to cycle through suggestions
- Display suggestions as ghost text in input prompt
- Add `useFollowupSuggestions` hook for React
- Update InputForm to display suggestions as placeholder
- Add CSS styling for suggestion appearance with counter
- Add keyboard handlers (Tab, arrow keys)
- After streaming completes with tool calls, suggestions appear
- Tab accepts the current suggestion
- Left/Right arrows cycle through multiple suggestions
- Typing or pasting dismisses the suggestion
- Shell command rules (tests, git, npm install) don't work yet due to
history not storing tool arguments
- VSCode extension integration pending
- Web UI needs parent app integration for suggestion generation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: resolve merge conflicts and build errors
- Rebased on upstream main (5d02260c8)
- Fixed JSX structure in InputPrompt.tsx
- Changed `return;` to `return true;` in follow-up handlers
- Added @agentclientprotocol/sdk to core package dependencies
- Restored correct BaseTextInput usage (self-closing, no children)
- Follow-up suggestions now shown via placeholder prop only
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: remove @agentclientprotocol/sdk from core package.json
The types are imported in fileSystemService.ts but the package
should not be a runtime dependency of core. It's provided by
the CLI package which depends on core. This was causing
package-lock.json sync issues on Node.js 24.x CI.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: restore alphabetical order of dependencies in core/package.json
* fix: restore package-lock.json from upstream to fix Node 24.x CI
* fix: resolve acpConnection test failure and ESLint warning
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* style: apply prettier formatting after merge
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* fix(followup): address review issues in follow-up suggestions
- Export followupState.ts from core index (was dead code)
- Refactor CLI and WebUI hooks to use shared followupReducers (eliminate duplication)
- Move side effects out of setState updaters via queueMicrotask
- Fix AppContainer useEffect dependency on unstable historyManager.history reference
- Reorder matchesRule to check pattern before condition (cheaper first)
- Make RuleBasedProvider collect from all matching rules with dedup and limit
- Add missing resetGenerator export for testing
- Add explicit implements SuggestionProvider to RuleBasedProvider
- Fix unstable followup object in useEffect dependency arrays
- Merge duplicate imports to fix eslint import/no-duplicates warnings
- Standardize copyright year to 2025
- Add test files for followupState, ruleBasedProvider, suggestionGenerator
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): address review feedback from PR #2525
- Fix acceptingRef race: set lock synchronously before queueMicrotask
- Derive hasError/wasCancelled from actual tool call statuses
- Incorporate rule priority into suggestion priority calculation
- Clear suggestions immediately when setSuggestions([]) is called
- Add !completion.showSuggestions guard to Tab handler
- Fix onAcceptFollowup type from (string) => void to () => void
- Fix ToolCallInfo.name doc examples to match display names
- Scope CSS counter ::after to data-has-suggestion + empty conditions
- Reset regex lastIndex before test() for g/y flag safety
- Stabilize hook return with useMemo + onAcceptRef pattern
- Add @qwen-code/qwen-code-core as webui external + peerDependency
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): address second round of review feedback
- Scope CSS max-width to match counter condition (not count=1)
- Only dismiss followup on printable character input, not navigation keys
- Restrict tool_group scan to most recent contiguous block (current turn)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): clear suggestions on new turn, add search guards
- Clear followupSuggestions when streaming starts (Idle → Responding)
to prevent stale suggestions from previous turns
- Add !reverseSearchActive && !commandSearchActive guards to Tab handler
to avoid keybinding conflicts with search modes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): address third round of review feedback
- Fix string pattern asymmetry: only match tool names when matchMessage=false
- Collect tool_groups from last user message boundary, not contiguous tail
- Flatten to individual tool calls before slicing to cap at 10 actual calls
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): fix arrow cycling guard and align rule conditions with patterns
- Remove unreliable textContent check for arrow cycling in WebUI InputForm;
rely on inputText state which already accounts for zero-width spaces
- Add 'error' to fix/bug rule condition to match its regex pattern
- Add 'clean up' to refactor rule condition to match its regex pattern
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): reset acceptingRef in clear() to prevent deadlock
If clear() is called during accept debounce window, acceptingRef
could remain stuck true permanently. Now reset in clear().
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): cancel pending timeout in dismiss() and accept()
Prevents stale suggestion timeout from re-showing suggestions
after user dismisses or accepts during the 300ms delay window.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): reset lastIndex in removeRules() for g/y flag safety
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(vscode-ide-companion): mark @qwen-code/qwen-code-core as external in webview esbuild
The webui package now declares @qwen-code/qwen-code-core as external in its
vite build config. Without this change, the vscode-ide-companion webview
esbuild (platform: 'browser') would try to bundle core's Node.js-only
dependencies (undici, @grpc/grpc-js, fs, stream, etc.), causing 562 build
errors during `npm ci`.
* fix: restore node_modules/@google/gemini-cli-test-utils workspace link in lockfile
The top-level workspace symlink entry was accidentally removed by a local
npm install in commit 004baaeb, which replaced it with a nested
packages/cli/node_modules/ entry. npm ci requires the top-level link entry
to be present in the lockfile, otherwise it fails with:
"Missing: @google/gemini-cli-test-utils@0.13.0 from lock file"
Also syncs @qwen-code/qwen-code-core peerDependency into the lockfile
to match the updated packages/webui/package.json.
* refactor(followup): extract controller and improve rule matching
- Extract createFollowupController for unified state management across CLI and WebUI
- Refactor rule-based provider to match via assistant message keywords instead of tool arguments
- Add enableFollowupSuggestions user setting in UI category
- Decouple WebUI from @qwen-code/qwen-code-core by copying browser-safe state logic
- Add followupHistory.ts for extracting suggestion context from CLI history
- Add comprehensive tests for controller and rule matching scenarios
- Use --app-primary CSS variable for consistency
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* refactor(webui): import followup state from core package
- Remove followupState.ts from webui (moved to core)
- Import FollowupSuggestion, FollowupState types from core
- Add @qwen-code/qwen-code-core as peerDependency
- Add core to vite external list
- Update test to include id field in HistoryItem
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* refactor(followup): simplify generator, revert unrelated changes
- Collapse FollowupSuggestionsGenerator class into a single
generateFollowupSuggestions() function (152 → 26 lines)
- Inline extractSuggestionContext into followupHistory.ts
- Remove unused RuleBasedProvider.addRule/removeRules methods
- Revert unrelated acpConnection.test.ts refactor
- Fix followupHistory.test.ts HistoryItem missing id field
- Reduce test verbosity (162 → 36 lines for generator tests)
* fix(followup): fix accept() deadlock and restore UMD globals mapping
- Wrap queueMicrotask callback in try/catch/finally to prevent accepting
lock from being permanently held when onAccept throws
- Restore '@qwen-code/qwen-code-core': 'QwenCodeCore' in webui
vite.config.ts globals (regression from d0f38a5f)
- Add test case verifying accept() recovers after callback exception
* fix(followup): log accept callback errors instead of swallowing them
Replace empty catch {} with console.error to ensure onAccept errors
remain visible for debugging while still preventing deadlock via finally.
Update test to verify error is logged.
* refactor(webui): move followup hook to separate subpath entry
Move useFollowupSuggestions from the root entry to a dedicated
'@qwen-code/webui/followup' subpath so that consumers who only need
UI components are not forced to install @qwen-code/qwen-code-core.
- Add src/followup.ts as separate Vite lib entry
- Remove followup exports from src/index.ts
- Add ./followup exports map in package.json
- Mark @qwen-code/qwen-code-core as optional peerDependency
- Switch build from single-entry UMD to multi-entry ESM/CJS
* fix(webui): restore UMD build and isolate core from root type boundary
- Restore UMD output for root entry (used by CDN demos, export-html, etc.)
- Build followup subpath via separate vite.config.followup.ts to avoid
Vite's multi-entry + UMD limitation
- Replace FollowupState import in InputForm.tsx with a local structural
type (InputFormFollowupState) so root .d.ts no longer references
@qwen-code/qwen-code-core
- Root entry (JS + UMD + .d.ts) is now fully free of core dependency;
core is only required by '@qwen-code/webui/followup' subpath
* refactor(followup): replace rule-based suggestions with LLM-based prompt suggestion
Replace the hardcoded rule-based follow-up suggestion engine with an LLM-based
prompt suggestion system, aligned with Claude Code's NES (Next-step Suggestion)
architecture.
Core changes:
- Replace ruleBasedProvider with generatePromptSuggestion using BaseLlmClient.generateJson()
- Port Claude Code's SUGGESTION_PROMPT and 14 filter rules (shouldFilterSuggestion)
- Simplify state from multi-suggestion array to single string (FollowupState)
- Add framework-agnostic controller with Object.freeze'd initial state
Guard conditions (9 checks):
- Settings toggle, non-interactive/SDK mode, plan mode
- Permission/confirmation/loop-detection dialogs, elicitation requests
- API error response detection, conversation history limit (slice -40)
UI interaction (CLI + WebUI):
- Tab: fill suggestion into input
- Enter: accept and submit
- Right Arrow: fill without submitting
- Typing/paste: dismiss suggestion
- Autocomplete conflict prevention
Telemetry (PromptSuggestionEvent):
- outcome (accepted/ignored/suppressed), accept_method (tab/enter/right)
- time_to_accept_ms, time_to_ignore_ms, time_to_first_keystroke_ms
- suggestion_length, similarity, was_focused_when_shown, prompt_id
- Per-rule suppression logging with reason strings
Deleted files:
- ruleBasedProvider.ts/test, followupHistory.ts/test, types.ts (dead FollowupSuggestion type)
13 rounds of adversarial audit, 17 issues found and fixed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): address qwen3.6-plus-preview review findings
P0: Fix API error detection — check pendingGeminiHistoryItems for error
items (API errors go to pending items, not historyManager.history).
P1: Don't log abort as 'error' in telemetry — aborts are normal user
behavior (user started typing), not errors.
P3: Early return in dismiss() when state already cleared, avoiding
redundant applyState call after accept().
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(settings): update suggestion feature description to match current behavior
Remove outdated "arrow keys to cycle" text — the feature now uses
Tab/Right Arrow to accept and Enter to accept+submit (no cycling).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): fix WebUI Enter submitting empty text + defend onOutcome
P0/P1: WebUI Enter handler now passes suggestion text explicitly via
onSubmit(e, followupSuggestion) instead of relying on React setState
(which is async and would leave inputText as "" in the closure).
P3: Wrap onOutcome callbacks in try/catch in both accept() and dismiss()
so telemetry errors cannot block state transitions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): allow setSuggestion(null) when disabled + fix dts clobber
- setSuggestion(null) now always clears state/timers even when disabled,
preventing stale suggestions from lingering after feature toggle.
- Set insertTypesEntry: false in followup vite config to prevent
overwriting the main build's index.d.ts.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(webui): thread explicitText through submit chain for Enter accept
handleSubmit and handleSubmitWithScroll now accept an optional
explicitText parameter. When provided (e.g., from prompt suggestion
Enter accept), it is used instead of the closure-captured inputText,
fixing the React setState race where onSubmit reads stale empty text.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): address Copilot review — 4 fixes
- Enter accept: use buffer.text.length === 0 instead of !trim() to
prevent whitespace-only input from triggering suggestion accept
- Move ref tracking from render body to useEffect to avoid
render-time side effects in StrictMode/concurrent rendering
- Align PromptSuggestionEvent event.name to 'qwen-code.prompt_suggestion'
matching the EVENT_PROMPT_SUGGESTION constant used by the logger
- Fix onOutcome JSDoc: remove mention of 'suppressed' (handled separately)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): address Copilot review — curated history, type compat, peer version
- Use curated history (getChat().getHistory(true)) to avoid invalid
entries causing API 400 errors in suggestion generation
- Use method signature for onSubmit in InputFormProps to maintain
bivariant compatibility with existing consumers under strictFunctionTypes
- Tighten @qwen-code/qwen-code-core peer dependency to >=0.13.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(followup): add prompt cache sharing + speculation engine
Phase 1 — Forked Query (cache sharing):
- CacheSafeParams: snapshot of generationConfig (systemInstruction + tools)
+ curated history + model + version, saved after each successful main turn
- createForkedChat: isolated GeminiChat sharing the same cache prefix for
DashScope cache_control hit
- runForkedQuery: single-turn request via forked chat with JSON schema support
- suggestionGenerator: uses forked query when CacheSafeParams available,
falls back to BaseLlmClient.generateJson otherwise
- GeminiChat.getGenerationConfig(): new getter for cache param snapshots
- Feature flag: enableCacheSharing (default: false)
Phase 2 — Speculation (predictive execution):
- OverlayFs: copy-on-write filesystem for speculation file isolation
(/tmp/qwen-speculation/{pid}/{id}/), handles new files + existing files
- speculationToolGate: tool boundary enforcement using AST-based shell
checker (not deprecated regex), write tools gated by ApprovalMode
(only auto-edit/yolo allow overlay writes)
- speculation.ts: startSpeculation (on suggestion display), acceptSpeculation
(on Tab/Enter — copies overlay to real FS, injects history via addHistory),
abortSpeculation (on user input/new turn — cleanup overlay)
- Custom execution loop: toolRegistry.getTool → tool.build → invocation.execute
(bypasses CoreToolScheduler — permission handled by toolGate)
- ensureToolResultPairing: strips unpaired functionCalls at boundary
- Boundary-aware tool result preservation: keeps executed tool results
even when boundary truncates remaining calls
- Feature flag: enableSpeculation (default: false)
Telemetry:
- SpeculationEvent: outcome, turns_used, files_written, tool_use_count,
duration_ms, boundary_type, had_pipelined_suggestion
- logSpeculation logger function
Security:
- Write tools only allowed in auto-edit/yolo mode during speculation
- Shell commands gated by isShellCommandReadOnlyAST (AST parser)
- Unknown/MCP tools always hit boundary (safe default)
- All structuredClone for cache param isolation
4 rounds of adversarial audit, 20+ issues found and fixed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): address Copilot review — curated history, type compat, peer version
- Move web_fetch/web_search from SAFE_READ_ONLY to BOUNDARY tools
(they require user confirmation for network requests)
- Add overlay read path resolution for read tools (resolveReadPaths)
so speculative reads see overlay-written files
- Wire enableCacheSharing setting into generatePromptSuggestion
- Fix esbuild comment to not hardcode webui version
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(speculation): use index-based tracking for boundary tool pairing
Track executed function calls by order (first N matching
functionResponses.length) instead of by name. Fixes incorrect
pairing when model emits multiple calls with the same tool name.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(speculation): handle undefined functionCall.name + wrap rewritePathArgs
- Skip functionCall parts with missing name instead of non-null assertion
- Wrap rewritePathArgs in try/catch — treat path rewrite failure as boundary
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(followup): pipelined suggestion, UI rendering, dismiss abort
- Pipelined suggestion: after speculation completes, generate next
suggestion using augmented context. Promoted on accept.
- UI rendering: completed speculation results rendered via historyManager.
- Dismiss abort: typing/pasting calls dismissPromptSuggestion → clears
promptSuggestion → useEffect aborts running speculation immediately.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): clear cache on reset, truncate history, fix test + comment
- Clear CacheSafeParams on startChat/resetChat to prevent cross-session leakage
- Truncate history to 40 entries before deep clone in saveCacheSafeParams
to reduce CPU/memory overhead on long sessions
- Update stale comment about speculation dismiss lifecycle
- Add onAccept assertion to accept test with proper microtask flush
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs(design): add prompt suggestion design documentation
- prompt-suggestion-design.md: architecture, generation, filtering, state
management, keyboard interaction, telemetry, feature flags
- speculation-design.md: copy-on-write overlay, tool gate security, boundary
handling, pipelined suggestion, forked query cache sharing
- prompt-suggestion-implementation.md: implementation status, test coverage,
audit history, Claude Code alignment tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(overlay): align catch comment with silent behavior
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): wire augmented context into pipelined suggestion + guard Tab/Right
- Pipelined suggestion now includes the accepted suggestion text and
speculated model response as context for the next prediction
- Tab/ArrowRight handlers only preventDefault when onAcceptFollowup
is provided, preventing key interception without a wired callback
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(speculation): filter thought parts + add filePath to path keys
- Skip thought/reasoning parts from model responses to prevent leaking
internal reasoning into speculated history
- Add 'filePath' to path rewrite key list for LSP and other tools that
use camelCase argument names
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(overlay): resolve relative paths against realCwd not process.cwd
Relative tool paths are now resolved against the overlay's realCwd
before computing the relative path, preventing incorrect outside-cwd
detection when process.cwd() differs from config.getCwd().
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs(design): fix 4 doc-code inconsistencies
- Guard conditions: clarify 13 code checks vs 11 table categories,
separate feature flags from guard block, add streaming transition
- Filter rules: 14 → 12 (actual count in code and table)
- BOUNDARY_TOOLS: add todo_write + exit_plan_mode to doc table
- SpeculationEvent: 8 → 7 fields (matching code)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): turns_used metric + reuse SUGGESTION_PROMPT + reduce clones
- turns_used: count only model messages (not all Content entries)
to accurately reflect LLM round-trips instead of inflated 3x count
- Pipelined suggestion: reuse exported SUGGESTION_PROMPT from
suggestionGenerator instead of a degraded local copy, ensuring
consistent quality (EXAMPLES, NEVER SUGGEST rules included)
- createForkedChat: replace redundant structuredClone with shallow
copies since params are already deep-cloned snapshots
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(followup): speculation UI tool rendering + speculationModel setting
- Speculation UI: render tool calls as tool_group HistoryItems with
structured name/description/result instead of plain text only
- speculationModel setting: allows using a cheaper/faster model for
speculation and pipelined suggestion. Leave empty to use main model.
Passed through startSpeculation → runSpeculativeLoop → pipelined.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs(design): sync docs with latest code changes
- Add speculationModel setting to feature flags table
- Document tool_group UI rendering in speculation accept flow
- Fix createForkedChat: deep clone → shallow copy (already cloned snapshots)
- Document pipelined suggestion SUGGESTION_PROMPT reuse
- Add Model Override and UI Rendering sections to speculation-design
- Update line counts to match actual file sizes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* test(followup): add unit tests for overlayFs, toolGate, forkedQuery
overlayFs (15 tests): COW write, read resolution, apply, cleanup, path traversal
speculationToolGate (24 tests): tool categories, approval mode gating, shell AST, path rewrite
forkedQuery (6 tests): cache params save/get/clear, deep clone, version detection
Total: 27 → 173 tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* test(followup): P0-P2 test coverage for speculation + controller + toolGate
speculation.test.ts (7 tests):
- ensureToolResultPairing: empty, no calls, paired, unpaired text+call,
unpaired call-only, user-ending, empty parts
followupState.test.ts (+8 tests = 15 total):
- onOutcome: accepted/tab, ignored/dismiss, error caught, no-op when cleared
- clear(): resets accepting lock allowing re-accept
- double accept blocked by debounce
- setSuggestion replaces pending timer
speculationToolGate.test.ts (+3 tests = 27 total):
- resolveReadPaths: overlay path after write, unchanged when not written
- rewritePathArgs: path key coverage
Total: 173 → 190 tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* test(followup): smoke tests + P0-P2 coverage gaps
smoke.test.ts (21 tests): E2E verification across modules
- Filter against realistic LLM outputs (9 good + 7 bad + reason check)
- OverlayFs full round-trip (write → read → apply → verify)
- ToolGate → OverlayFs integration (write redirect → read resolve)
- CacheSafeParams lifecycle (save → mutate → isolation → clear)
- ensureToolResultPairing orphaned functionCalls
followupState.test.ts (+8 tests):
- onOutcome: accepted/tab, ignored/dismiss, error caught, no-op cleared
- clear(): resets accepting lock
- double accept debounce
- setSuggestion replaces pending timer
speculationToolGate.test.ts (+3 tests):
- resolveReadPaths through overlay after write
- path key coverage for rewritePathArgs
Export ensureToolResultPairing for testing.
Total: 190 → 211 tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): dismiss aborts suggestion, boundary skip inject, parentSignal check
- dismissPromptSuggestion now also aborts suggestionAbortRef to prevent
race between dismiss and in-flight startSpeculation
- Boundary speculation: skip acceptSpeculation (which injects history),
fall through to normal addMessage to avoid duplicate user turns
- startSpeculation: check parentSignal.aborted upfront before starting
- Speculation rendering: use index-based loop instead of indexOf O(n²)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs(design): fix speculation accept diagram — boundary skips inject
The architecture diagram now shows the branching logic: completed
speculations go through acceptSpeculation (inject + render), while
boundary speculations are discarded and the query is submitted fresh
via addMessage.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(followup): enable cache sharing by default
enableCacheSharing now defaults to true. This is a pure cost
optimization with no behavioral change — suggestion generation
uses the forked query path (sharing the main conversation's
prompt cache prefix) when CacheSafeParams are available.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): aborted parent skips loop, acceptSpeculation try/finally, doc sync
- startSpeculation: return aborted state immediately when parentSignal
is already aborted, without creating overlay or starting loop
- acceptSpeculation: wrap in try/finally to guarantee overlay cleanup
even if applyToReal or addHistory throws
- Doc: enableCacheSharing default false → true (matches code)
- Doc: update test count table (7 → 15 followupState, add 6 new files)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): remove debug logs, add function calling fallback for non-FC models
- Remove all followup-debug process.stderr.write logs
- Add direct text fallback in generateViaBaseLlm when generateJson
returns {} (model doesn't support function calling, e.g., glm-5.1)
- Add CJK text support in filter: skip whitespace-based word count
for Chinese/Japanese/Korean text, use character count instead
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(followup): add suggestionModel setting for faster suggestion generation
New setting `suggestionModel` allows using a smaller/faster model
(e.g., qwen-turbo) for prompt suggestion generation instead of the
main conversation model. Reduces suggestion latency significantly.
Passed through: settings → AppContainer → generatePromptSuggestion
→ generateViaForkedQuery / generateViaBaseLlm (both paths).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(followup): suggestionModel setting, /stats tracking, /about display
- suggestionModel: new setting to use a faster model for suggestion
generation (e.g., qwen3.5-flash instead of main model glm-5.1)
- /stats: suggestion API calls now report usage to UiTelemetryService
so token consumption appears in /stats model breakdown
- /about: shows Suggestion Model field (configured or main model)
Also:
- Function calling fallback for non-FC models (direct text generation)
- CJK text support in word count filter (character-based for Chinese)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* i18n: add Suggestion Model translations for /about display
en: Suggestion Model | zh: 建议模型 | ja: 提案モデル
de: Vorschlagsmodell | pt: Modelo de Sugestão | ru: Модель предложений
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): always use generateContent for suggestion (not generateJson)
generateJson doesn't expose usageMetadata, so /stats can't track
suggestion model tokens. Switch to direct generateContent which
always returns usage data. Also simplifies the code by removing
the function-calling + fallback dual path.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): fix /stats tracking — use ApiResponseEvent constructor
Use ApiResponseEvent class constructor with proper response_id and
override event.name to match UiEvent type for UiTelemetryService
switch statement. This ensures suggestion model token usage appears
in /stats model output.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* i18n: fix Chinese translation for Suggestion Model
"建议模型" → "提示建议模型" to avoid ambiguity.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor(followup): merge suggestionModel + speculationModel into fastModel
Single unified setting for all background tasks: suggestion generation,
speculation, pipelined suggestions, and future background tasks.
Users only need to understand one concept: main model for conversation,
fast model for background tasks.
- Remove: suggestionModel, speculationModel
- Add: fastModel (ui.fastModel in settings.json)
- Update /about display: "Fast Model" with i18n translations
- Update all 6 locale files (en/zh/ja/de/pt/ru)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor(settings): move fastModel to top-level (parallel to model)
fastModel is an independent model concept, not a property of the
main model. Move from model.fastModel to top-level settings.fastModel.
Config: { "fastModel": "qwen3.5-flash", "model": { "name": "glm-5.1" } }
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): report usage in both forkedQuery and baseLlm paths
The forkedQuery path (used when enableCacheSharing=true) was not
reporting token usage to UiTelemetryService, so /stats model didn't
show the fast model. Now both paths report usage.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(cli): add /model --fast command to set fast model
Usage:
/model --fast qwen3.5-flash — set fast model
/model --fast — show current fast model
/model — open model selection dialog (unchanged)
Saves to user settings (SettingScope.User).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs(design): update to fastModel (replace suggestionModel/speculationModel)
- prompt-suggestion-design.md: speculationModel → fastModel (top-level)
- speculation-design.md: Model Override → Fast Model, update description
- prompt-suggestion-implementation.md: update settings description
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(cli): /model --fast opens model selection dialog for fast model
When called without a model name, /model --fast now opens the same
model selection dialog used by /model, but selecting a model saves
it as fastModel instead of switching the main model.
- useModelCommand: add isFastModelMode state
- ModelDialog: intercept selection in fast model mode, save to fastModel
- DialogManager: pass isFastModelMode prop to ModelDialog
- types.ts: add 'fast-model' dialog type
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): pass resolved model (not undefined) to runForkedQuery
model: modelOverride → model: model (which has the fallback applied)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(cli): /model --fast defaults to current fast model in dialog
When opening the model selection dialog via /model --fast, the
currently configured fastModel is pre-selected instead of the
main model.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(cli): add --fast tab completion for /model command
/model <Tab> now shows --fast as a completion option with description.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(schema): regenerate settings.schema.json with new followup settings
Adds enableCacheSharing, enableSpeculation, and fastModel to the
generated JSON schema so CI validation passes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(test): update tests for new Fast Model field in system info
Add "Fast Model" to expected labels in systemInfoFields and bugCommand
tests to match the new field added to /about and bug report output.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ci: trigger PR synchronize event
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address Copilot review comments (batch 4)
- modelCommand: use getPersistScopeForModelSelection for fastModel,
return meaningful info message instead of empty content
- ModelDialog: handle $runtime|authType|modelId format in fast-model mode
- forkedQuery: return structuredClone from getCacheSafeParams
- client: fix stale comment about history truncation order
- speculation: detect abort in .then() handler, set 'aborted' status
and cleanup overlay to prevent leaks
- docs: update test count table
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs(users): add followup suggestions user manual
- New feature page: followup-suggestions.md covering usage, keybindings,
fast model configuration, settings, and quality filters
- commands.md: add /model --fast command reference
- settings.md: add enableFollowupSuggestions, enableCacheSharing,
enableSpeculation, and fastModel settings documentation
- _meta.ts: register new page in navigation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs(users): audit fixes for followup suggestions documentation
- followup-suggestions.md: add 300ms delay, WebUI support, plan mode
guard, non-interactive guard, slash commands as single-word, meta/error
filters, character limit
- settings.md: move fastModel next to model section, add /model --fast
cross-reference and link to feature page
- overview.md: add followup suggestions to feature list
- i18n: add missing translations for 'Set fast model for background
tasks' and 'Fast model updated.' in all 6 locales
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address Copilot review comments (batch 5)
- modelCommand: remove duplicate info message (keep addItem only)
- followup-suggestions.md: clarify WebUI requires host app wiring
- speculation-design.md: fix abort telemetry description
- i18n: add missing translations for fast model strings
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(cli): remove duplicate message in /model --fast command
Use return message instead of addItem + empty return to avoid
blank INFO line in history. Also handle missing settings service.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(i18n): remove unused 'Fast model updated.' translations
The /model --fast command now returns the model name directly
instead of using this string. Remove dead translations.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(followup): disable thinking mode for suggestion and speculation
Forked queries inherit the main conversation's generationConfig which
may have thinkingConfig enabled. This wastes tokens and adds latency
for background tasks that don't need reasoning. Explicitly set
thinkingConfig.includeThoughts=false in both paths:
- createForkedChat (covers forked query + speculation)
- generateViaBaseLlm (non-cache-sharing fallback)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: document thinking mode auto-disable for background tasks
- User docs: note that thinking is auto-disabled for suggestions/speculation
- Design docs: detail thinkingConfig override in both forked query and
BaseLlm paths, explain why cache hits are unaffected
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: jinjing.zzj <jinjing.zzj@alibaba-inc.com>
Co-authored-by: yiliang114 <1204183885@qq.com>
- Changed all instances of "Bailian Coding Plan" to "ModelStudio Coding Plan" in README.md and related documentation.
- Updated localization files for multiple languages to reflect the new branding.
- Ensured consistency across all references to the API key and subscription requirements for the ModelStudio Coding Plan.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Remove the summarizeToolOutput setting and related functionality.
This feature allowed LLM-based summarization of shell tool output but is no longer needed.
This simplifies the codebase by removing unused summarization logic and configuration options.
Remove the enableToolOutputTruncation boolean setting. Users can now
disable truncation by setting truncateToolOutputThreshold to 0 or a
negative value instead of using a separate toggle.
This simplifies the configuration and prevents users from accidentally
disabling truncation which could cause memory issues with large tool
outputs.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Replace nested API-KEY submenu with flat three-option layout
- Add descriptive labels for each authentication method:
- Qwen OAuth: Free, up to 1,000 requests/day
- Alibaba Cloud Coding Plan: Paid, multiple model providers
- API Key: Bring your own API key
- Simplify region selection for Coding Plan (China vs Global)
- Use DescriptiveRadioButtonSelect for better visual hierarchy
- Add itemGap prop to BaseSelectionList for spacing
- Update i18n strings in en.js, zh.js, and ru.js
- Simplify custom API key configuration info view
- Clean up unused region-specific strings
Closes#2016
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Update error messages for unsupported image/PDF inputs with clearer guidance
- Add `modalities` setting to override auto-detected input modalities
- Document `modalities` config in model-providers.md and settings.md
- Update converter tests to match new error message format
This provides users with actionable alternatives when their selected model doesn't support certain input types, and allows manual modality overrides for models not recognized by auto-detection.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add backupSettingsFile() utility to create .orig backup before modifying settings
- Update success message to indicate backup was created
- Sync i18n translations for all supported languages
- Update documentation to reflect the change
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Create new model-providers.md with complete model provider configuration guide
- Add Bailian Coding Plan documentation with setup and auto-update details
- Remove modelProviders content from settings.md to avoid duplication
- Document reserved envKey BAILIAN_CODING_PLAN_API_KEY and security recommendations
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add comprehensive configuration examples for all auth types (openai, anthropic, gemini, vertex-ai)
- Add local self-hosted model examples (vLLM, Ollama, LM Studio)
- Clarify generation config layering with impermeable provider layer concept
- Add Provider Model vs Runtime Model explanation
- Document duplicate model ID limitation
- Deprecate security.auth.apiKey and security.auth.baseUrl settings
- Add notes about extra_body parameter support limitations
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>