qwen-code/docs/superpowers
顾盼 7ede46cff2
feat(cli): reference prior sessions via @ and add completion tabs (#7302)
* docs: design spec for @ session reference + tabbed completion UI

* docs: implementation plan for @ session reference + tabbed completion UI

* feat(cli): add @session: mention ref parser

* feat(core): add SessionReferenceService for slimmed session injection

* feat(cli): inject slimmed prior-session context on @session: mention

* feat(cli): surface prior sessions as @ completion suggestions

* feat(cli): tabbed category layout for @ completion dropdown

* feat(cli): ←/→ tab switching for @ completion categories

* docs: mark @ session reference design as implemented

* fix(cli): preserve assistant text on tool-call turns, keep newest turn under budget, guard stale session results

* docs(core): clarify SessionReferenceService slimming rules

* perf(cli): remove @ completion input latency from session listing

Dispatch file/MCP suggestions immediately and append prior-session
suggestions in a second render once the disk listing resolves, instead
of blocking the first render on session I/O. Cache the per-cwd session
listing for a short TTL so rapid keystrokes don't re-walk the chats dir.

* Revert "perf(cli): remove @ completion input latency from session listing"

This reverts commit 08bbbc21386ac0cd6db7a6f480f0fd59f2e6b8d4.

* fix(cli): harden session ref resolution and i18n tab labels (#7302)

* fix(cli): guard session ref I/O errors to never abort the turn (#7302)

* fix(cli): strip session: prefix in completion filter and align tab guard (#7302)

* fix(cli): address review feedback on session refs and tab tests (#7302)

* fix(cli): use SESSION_MENTION_PREFIX constant in completion filter (#7302)

* fix(cli): address review feedback on session refs and tab tests (#7302)

* fix(cli): address review feedback on session refs and tab tests (#7302)

- Constrain ctrl/command on completion tab-switch bindings so
  ctrl+left/right (word-jump) is not consumed for tab switching
- Derive a friendly title from the first user message in
  SessionReferenceService.resolve() when no explicit title is given,
  so UUID-based refs show meaningful context headers
- Fix dead conditional in plan doc code snippet

* fix(cli): surface real session lookup errors and test left tab switch (#7302)

* fix(cli): reset suggestion indices when active category tab disappears (#7302)

* fix(cli): address review feedback on session refs docs and tests (#7302)

* fix(cli): address review feedback on session refs and completion ordering (#7302)

* docs(cli): clarify title matching semantics in session reference design (#7302)

* test(cli): assert error card in ambiguous session title test (#7302)

* fix(core,cli): address review feedback on session refs (#7302)

- Replace O(N²) budget trimming with single-pass backward accumulation
  (maintainer-measured 6.8s → ~80ms for 8k-record sessions)
- Include header/marker overhead in approxTokens
- Prefer custom_title system record in deriveTitle over first user message
- Move session-ref detection before MCP resource ref to prevent collision
  with an MCP server literally named "session"
- Handle bare @session (no colon) as empty filter in completion
- Clamp activeSuggestionIndex when suggestion list shrinks
- Strengthen not-found test assertion to check ToolCallStatus.Error
- Fix unreachable mock state in InputPrompt tab-guard test
- Add tests: custom_title derivation, overhead in approxTokens,
  bare session filter, index clamping, activeCategory reset

* fix(core,cli): address review feedback on session refs (#7302)

- Fix approxTokens to exclude omission marker cost when not truncated
- Clamp visibleStartIndex when suggestion list shrinks to prevent empty dropdown
- Document merge order invariant for session suggestions in @ completion

* fix(core,cli): address review feedback on session refs (#7302)

* fix(core): address review feedback on session refs (#7302)

* fix(core,cli): address review feedback on session refs (#7302)

* fix(core): address review feedback on session refs (#7302)

* fix(cli): address review feedback on session refs (#7302)

* fix(core,cli): address review feedback on session refs (#7302)

- Wrap MCP category label in t() for i18n consistency
- Fix comment to match > 2 tab guard semantics
- Add test for Ctrl+arrow with exactly 2 categories (guard boundary)
- Fix budget loop to not reserve marker tokens when session fits

---------

Co-authored-by: qwen-code-ci-bot <qwen-code-ci-bot@users.noreply.github.com>
Co-authored-by: Qwen Code Bot <qwen-code-bot@users.noreply.github.com>
Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
2026-07-24 06:11:48 +00:00
..
plans feat(cli): reference prior sessions via @ and add completion tabs (#7302) 2026-07-24 06:11:48 +00:00
specs feat(cli): reference prior sessions via @ and add completion tabs (#7302) 2026-07-24 06:11:48 +00:00