Repository navigation
1.0.47
What's Changed
Add worktree context injection and disable command filtering by default (#78)
- Worktree-specific context: Adds a new
contextcolumn to the worktrees table (schema v8) that allows users to write markdown context per worktree. This context is automatically injected into the first prompt of each new AI session, providing persistent background information (e.g., feature descriptions, API endpoints, conventions) without requiring manual re-entry. - Context editor UI: New
WorktreeContextEditorcomponent with edit/preview modes, markdown rendering, Cmd+S save shortcut, unsaved-changes protection, and a dedicated tab in the session tabs bar. Accessible via "Edit Context" in worktree dropdown/context menus. - Context duplication: When duplicating a worktree, the source worktree's context is automatically copied to the new worktree.
- Command filtering default disabled: Changes the default
commandFiltering.enabledsetting fromtruetofalseso new sessions start without command filtering restrictions.
Fix run tab lag: reduce buffer limits, line-split output, optimize URL detection (#77)
Fixes performance issues causing the Run tab to become laggy during high-output script execution.
- Reduced ring buffer limits: Lowered
MAX_CHARSfrom 500K → 200K andBUFFER_CAPACITYfrom 50K → 10K entries to reduce memory pressure and improve rendering performance - Line-split output before buffering: Script output (
event.data) is now split by newlines before appending to the ring buffer — each entry is a single line instead of a raw multi-line chunk. Applied to bothuseScriptStore(run scripts) anduseWorktreeStore(setup scripts) - Optimized dev server URL detection: Replaced
useMemowithuseEffect+useStateinBottomPanel— once a URL is detected, scanning stops entirely with zero cost per subsequent output version bump. Resets on run stop so the next run can detect a fresh URL - Updated tests: Adjusted buffer limit assertions to match new 200K cap; exported
MAX_CHARSconstant fromoutput-ring-buffer.tsfor DRY test assertions
Add worktree-specific context with editor UI and session injection (#76)
Adds a worktree-specific context feature that allows users to attach custom context/instructions to individual worktrees. This context is automatically injected into AI coding sessions on the first prompt, giving per-worktree guidance to the AI assistant.
What's included
- Database layer (schema v8): New nullable
contextTEXT column on theworktreestable, with migration, type updates across main/preload layers,updateWorktreeContextandgetWorktreeByPathDB methods - IPC & preload bridge:
worktree:getContextandworktree:updateContextchannels exposed viawindow.worktreeOps - Context editor UI: Full
WorktreeContextEditorcomponent with markdown preview/edit toggle, unsaved changes indicator, confirmation dialog on close, and Cmd+S/Ctrl+S save shortcut - Session integration: New context tab type in
SessionTabsalongside file and diff tabs; lazy-loaded routing inMainPane - AI session injection: On the first prompt of each AI session, the worktree's context (if set) is prepended to the user message — tracked via a module-level
Setwith proper cleanup on disconnect - Worktree duplication: Context is copied to new worktrees when duplicating
- UX polish: "Edit Context" menu item in worktree dropdown/context menus,
activateContextEditorstore method to avoid redundant tab opens, unsaved changes warning dialog
Files changed (14 files, +505 / −10)
| File | Change |
|---|---|
src/main/db/database.ts |
Add context column mapping, updateWorktreeContext, getWorktreeByPath methods |
src/main/db/schema.ts |
Schema v8 migration — add context column to worktrees |
src/main/db/types.ts |
Add context field to Worktree type |
src/main/ipc/opencode-handlers.ts |
Inject worktree context on first AI session prompt, cleanup tracking |
src/main/ipc/worktree-handlers.ts |
Add worktree:getContext and worktree:updateContext IPC handlers |
src/main/services/worktree-ops.ts |
Copy context on worktree duplication |
src/preload/index.d.ts |
Type declarations for new worktree context APIs |
src/preload/index.ts |
Expose getWorktreeContext and updateWorktreeContext on worktreeOps |
src/renderer/src/components/layout/MainPane.tsx |
Add lazy-loaded WorktreeContextEditor route |
src/renderer/src/components/sessions/SessionTabs.tsx |
Add context tab type with unsaved indicator |
src/renderer/src/components/worktrees/WorktreeContextEditor.tsx |
Full editor component (markdown preview, edit, save, keyboard shortcut) |
src/renderer/src/components/worktrees/WorktreeItem.tsx |
"Edit Context" menu item in dropdown and context menus |
src/renderer/src/stores/useFileViewerStore.ts |
Context editor state, tab management, activateContextEditor |
Upgrade Claude Agent SDK to ^0.2.62 (#75)
- Bumps
@anthropic-ai/claude-agent-sdkfrom^0.2.50to^0.2.62inpackage.json - Updates
pnpm-lock.yamlto resolve the new SDK version (0.2.62) along with transitive dependency changes:- Adds
minimatch@5.1.9(replacing5.1.6usage inreaddir-glob) - Updates integrity hashes for the SDK package
- Adds