Skip to content

feat(flow-chat): reference idle sessions from chat input - #1721

Merged
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:dev2
Jul 23, 2026
Merged

feat(flow-chat): reference idle sessions from chat input#1721
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:dev2

Conversation

@wsp1911

@wsp1911 wsp1911 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Extend the chat input @ picker to search files, folders, and idle sessions across currently open local and SSH workspaces.
  • Send selected session locators as structured message metadata and preserve that metadata through the frontend queue.
  • Materialize bounded, newest-first session transcripts into current-session artifacts only when a turn is dispatched.
  • Add short collision-safe transcript artifact names, line-range metadata, and a safe-use reminder for agents.
  • Reject archived, hidden, busy, queued, invalid, or self-referencing sessions.

Fixes: N/A

Type and Areas

Type:

Feature / UI/UX

Areas:

Rust core, desktop/Tauri, web UI, session persistence

Motivation / Impact

Users can provide another idle session as context without exposing that session's storage directory to agent tools. The agent receives a bounded local artifact and exact index/latest-turn line ranges for targeted Read or Grep calls.

Verification

  • pnpm run fmt:rs
  • pnpm run type-check:web
  • cargo check -p bitfun-desktop
  • cargo test -p bitfun-core session_reference_artifact_stems_extend_only_for_collisions -- --nocapture
  • cargo test -p bitfun-core materialized_session_reference_keeps_newest_complete_turn_and_overwrites_artifact -- --nocapture
  • git diff --check

Reviewer Notes

  • Session search is limited to currently open workspaces, including SSH workspaces.
  • Referenced transcripts are stored only under the consuming session's artifacts/session-references directory.
  • Normal filenames use the first 8 session-ID characters; same-turn prefix collisions extend by 4 characters.
  • Reminder metadata includes the full session ID, transcript URI, index range, latest-turn range, and total line count.
  • Transcript contents are explicitly treated as untrusted historical data.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above.
  • User-facing strings, docs, and locales are updated where applicable.

@wsp1911
wsp1911 marked this pull request as ready for review July 23, 2026 14:15
- Extend the chat input `@` picker to search files, folders, and idle sessions across currently open local and SSH workspaces.
- Send selected session locators as structured message metadata and preserve that metadata through the frontend queue.
- Materialize bounded, newest-first session transcripts into current-session artifacts only when a turn is dispatched.
- Add short collision-safe transcript artifact names, line-range metadata, and a safe-use reminder for agents.
- Reject archived, hidden, busy, queued, invalid, or self-referencing sessions.
@wsp1911
wsp1911 merged commit e7927d4 into GCWing:main Jul 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant