feat: add Files tab for browsing workspace files (#154)

* feat: add Files tab for browsing workspace files

- Add Files tab between Diff and Terminal in header
- Implement hierarchical file tree with expand/collapse
- Add fuzzy search with debouncing and relevance ranking
- Support gitignore filtering via `git check-ignore` (web + desktop)
- Add syntax highlighting for 150+ file types
- Add image preview (SVG, PNG, JPG, etc.)
- Add line numbers, wrap toggle, and copy button
- Desktop: split-pane layout matching DiffView
- Mobile: drill-in navigation with full-width sidebar
- Update help dialog with Cmd+3 shortcut
- Increase header breakpoint to 940px for new tab

* feat: enhance context and session stores to track agent/model/variant choices for historical sessions

* feat: implement line selection and commenting functionality in FilesView
This commit is contained in:
Bohdan Triapitsyn
2026-01-15 20:19:06 +02:00
committed by GitHub
parent ecf81c901d
commit 1be5dfda05
21 changed files with 2070 additions and 82 deletions
+18
View File
@@ -288,6 +288,24 @@ export const useSessionStore = create<SessionStore>()(
}
get().trimToViewportWindow(id, ACTIVE_SESSION_WINDOW);
// Analyze session messages to extract agent/model/variant choices
// This ensures context is available even when ModelControls isn't mounted
const sessionMessages = get().messages.get(id);
if (sessionMessages && sessionMessages.length > 0) {
const agents = useConfigStore.getState().agents;
if (agents.length > 0) {
try {
await useContextStore.getState().analyzeAndSaveExternalSessionChoices(
id,
agents,
get().messages
);
} catch (error) {
console.warn('Failed to analyze session choices:', error);
}
}
}
}
get().evictLeastRecentlyUsed();