Skip to content

Feat: add copilot in vs code#161

Closed
Dracer5 wants to merge 4 commits intovakovalskii:mainfrom
Dracer5:feat/add-copilot
Closed

Feat: add copilot in vs code#161
Dracer5 wants to merge 4 commits intovakovalskii:mainfrom
Dracer5:feat/add-copilot

Conversation

@Dracer5
Copy link
Copy Markdown

@Dracer5 Dracer5 commented Apr 9, 2026

Summary

This PR fixes session deletion consistency and completes Copilot integration stability so deleted sessions do not reappear after refresh.

What changed

  • fixed frontend Copilot filter wiring in sidebar view switching (copilot-only now applies tool filter correctly)
  • improved Copilot JSONL delta reconstruction by applying both kind=1 path updates and kind=2 array appends
  • improved Copilot assistant text extraction from response parts for current VS Code formats
  • hardened deletion flow to guarantee cache consistency after delete: runtime caches are invalidated immediately after successful deletion
  • hardened Copilot deletion to scan all known workspaceStorage roots and remove matching session files plus chatEditingSessions directory
  • normalized deleteSession input handling when project is missing, preventing runtime TypeError
  • updated documentation to reflect Copilot support and behavior in README and architecture docs

Why this functionality is added
Before this fix, delete could appear successful in UI but stale server-side caches could still return old sessions on subsequent loads.
For Copilot, deletion also needed to account for workspace-scoped storage layout and multiple potential roots.

User-facing behavior

  • when clicking Delete, a session is now physically removed and does not come back after page reload
  • Copilot filter button in sidebar now actually filters the list
  • Copilot detail/preview is more reliable due to correct JSONL state reconstruction
  • if a session is already absent, API returns a clear Session file not found error instead of silent no-op or TypeError

Why this does not break anything

Cache invalidation is scoped to runtime caches only and runs after delete operations.
Existing non-Copilot delete behavior is preserved, but now stricter (explicit error if nothing was deleted).
Copilot deletion remains path-safe and only targets files/directories matching the session id.
No migration or format changes are required.
Validation
Manual checks executed locally:

  • syntax: node -c for changed backend/frontend files
  • static checks for critical branches and invalidation call sites
  • isolated sandbox functional test:
    • create fake Claude session in temporary HOME
    • loadSessions confirms presence
    • deleteSession removes it
    • second loadSessions in same process confirms absence (validates cache invalidation)
  • Copilot smoke:
    • load Copilot sessions
    • check detail extraction for first sessions batch

Observed results:

  • syntax checks passed
  • sandbox delete test passed (beforeExists=true, afterExists=false)
  • Copilot smoke passed (sessions discovered, details non-empty for majority of sampled sessions)

Known limitations

  • deletion guarantee is bounded by process file-system permissions; if OS denies access, delete still fails as expected
  • Copilot cost remains unavailable where no reliable token pricing data exists for the stored model metadata

Risk assessment

Low risk.
Changes are localized to deletion consistency and Copilot parsing/filtering paths, with explicit fallbacks and clear error behavior.
Main behavioral tightening is intentional: delete now fails loudly when nothing was deleted, instead of pretending success.

@vakovalskii
Copy link
Copy Markdown
Owner

20k line diff — looks like the entire codebase was reformatted/overwritten. Please submit a focused PR with only the Copilot-specific changes.

vakovalskii added a commit that referenced this pull request Apr 10, 2026
Merged: #156 (star sync), #155 (clipboard fallback), #159 (bind URL fix),
#157 (session name vs first prompt), #160 (MCP badges toggle), #100 (Warp launch API)
Closed: #128 (dup), #148 (banned), #161 (bad diff)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants