Repository navigation
feat: send the recap and repost the last assistant message when opening a session - #30
Merged
Merged
Conversation
Adds a keyboard row above the agent/context grid that switches to the other project in one tap. Target: the project the last switch moved away from (settings.swapProject), falling back to the most recently active other project. The press is allowed while the session is busy: it detaches the running session instead of blocking. i18n for all locales and PRODUCT.md updated.
The project list can return entries without a name (cached session directories), which made the swap confirmation show the full worktree path.
The bottom keyboard now shows a single model button carrying the active thinking-effort variant; the separate variant button is gone. Tapping it opens the model list as before, and picking a model still opens the variant picker after the confirmation. Picking the already-active model now re-opens the variant picker with the current variant marked instead of silently resetting it to default; when the model offers no variant choice, a toast explains it. Also updated tests and PRODUCT.md.
The provider browser callback handler was defined twice with identical bodies; the second definition silently won at runtime. Keep a single copy.
- saved sessions: bottom-keyboard "Sessions" button with a menu to bookmark the current session (per project), open a bookmarked one, or drop it; bookmarks live in settings.json - prompt queue: the per-message menu now works while the session is busy, a dispatch skipped by a busy re-mark is retried instead of stranding the queue, and abort / project switch report the prompts they discard; the queued-button icon becomes an hourglass - project swap: lands on the target project's most recent session and releases the detached session's local busy and run state
… project swap - adopt the session variant when present; otherwise keep the effective variant (same model) or resolve the model's configured default - resolve the effective variant centrally (getStoredModel/getCurrentVariant share resolveVariant), also for the prompt - drop the synthetic Default row from the variant picker; a lone real variant is still offered when it is not the active one - tests: session adoption, resolution regressions (real config), variant menu (mocked and real-catalog chains)
- let the ⭐ button and the saved-menu callbacks through the busy guard - bookmarking/dropping entries are local; opening another session detaches the active run (same semantics as the project swap) - tests: busy-guard matrix with real modules and handler integration
- strip trailing commas (string-aware) before JSON.parse; warn once when the config cannot be loaded - keeps config-based variant defaults (reasoningEffort) working with real-world opencode.jsonc files - tests: mixed JSONC fixture, invalid-config warn-once, adversarial string/URL cases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Opening a session now sends, after the confirmation message: (1) the existing recent-messages recap and (2) the full rendered last assistant response, so it never has to be requested again.
Covered paths:
/sessionsmenu, saved-sessions menu (⭐ Sessions), and the quick project swap when it lands on the target project's most recent session.How
src/bot/services/session-recap-service.ts: shared pipeline (sendSessionRecapAndLatestResponse,sendLatestAssistantResponse) extracted fromsession-callback-handler.tswith no behavior change.attachSessionById/attachLatestProjectSessionnow returnSessionInfo | null(both consumers adapted) so the swap knows which session it attached to.Verification
bun run checkgreen (lint + build + 1972 pass / 3 skip / 0 fail).Note: stacked PR on
feat/saved-sessions(this repo's CI only runs with basemain), so no checks are expected here until the stack lands.