Commit Graph

1939 Commits

Author SHA1 Message Date
luk 2924495bfd feat(secrets): add secret obfuscation with regex flags support 2026-02-15 17:02:33 +00:00
can1357 e7d90ff703 chore: bump version to 12.5.1 2026-02-15 15:38:46 +01:00
can1357 0d3fc0d614 style: prompt formatting 2026-02-15 15:38:23 +01:00
can1357 aab245bc63 feat(edit): better hashline & benchmark prompts, re-ran codex 2026-02-15 15:38:06 +01:00
can1357 3a2b604db3 docs(coding-agent/prompts): clarified hashline anchor format and tool usage patterns in documentation
- Clarified hashline anchor format to emphasize `LINE:HASH` only without content suffix.
- Added explicit guidance on `set_line` with empty text behavior versus `replace_lines` for deletion.
- Added instruction to prefer `insert_after` over line replacement when adding fields/arguments/imports.
- Added common failure patterns section documenting anchor copying errors and wide range pitfalls.
- Updated all example tool calls to use concrete `LINE:HASH` format instead of template placeholders.
2026-02-15 15:22:16 +01:00
can1357 6cc367f37b feat(coding-agent): added repeatToolDescriptions config to control tool description rendering
- Added `repeatToolDescriptions` configuration setting to control tool description rendering in system prompts.
- Implemented conditional tool display logic that renders full tool descriptions when enabled or a concise comma-separated list when disabled.
- Threaded `repeatToolDescriptions` setting through SDK and system prompt building pipeline.
2026-02-15 14:55:44 +01:00
can1357 082eae59d1 chore: bump version to 12.5.0 2026-02-15 14:23:09 +01:00
can1357 8ff758ed07 feat(coding-agent/modes): fixed theme selector with non-destructive preview and deduplication
- Added new previewTheme() function to enable non-destructive theme preview during settings browsing.
- Implemented asynchronous theme loading with request deduplication to prevent race conditions when rapidly browsing theme options.
- Enhanced theme preview cancellation behavior to restore the previously active theme instead of the current value.
- Fixed theme preview updates being applied out-of-order when rapidly browsing theme options by using request ID tracking.
2026-02-15 14:22:43 +01:00
can1357 79cfe855c9 feat: enhanced glob patterns, symlink handling, and Tailwind CSS compilation
- Added `recursive` option to GlobOptions to control whether simple glob patterns match recursively by default (true).
- Changed glob pattern behavior to always apply recursive matching for simple patterns instead of requiring explicit `**/` prefix.
- Improved symlink handling in glob file type filters to resolve symlink targets and match based on their actual type (file/dir).
- Enhanced skill discovery in coding-agent to use dual-pass glob approach with deduplication and improved extension module detection.
- Implemented dynamic Tailwind CSS compilation in stats package by extracting actual class names from source files instead of building with empty candidates.
- Refactored Tailwind stylesheet imports to use centralized `tailwindcss/index.css` import with custom stylesheet loader callback.
2026-02-15 14:15:04 +01:00
can1357 5f2f26a901 perf(coding-agent): optimized model discovery and initialization with caching and parallel skills loading
- Added caching for model API key availability checks to avoid redundant lookups.
- Optimized model discovery loop to exit early on first available model instead of checking all models.
- Moved skills discovery to run in parallel with other initialization by starting it earlier.
2026-02-15 13:56:42 +01:00
can1357 fec2c04311 chore(monorepo): refreshed deps, migrated stats to tailwind v4, and improved discovery
- Updated dependency versions across root, ai, coding-agent, stats, and tui packages.
- Pinned @sinclair/typebox to 0.34.48.
- Migrated stats Tailwind build from PostCSS plugin usage to Tailwind v4 compile() API and emitted a standalone styles.css.
- Switched discovery helpers to native glob scanning for faster gitignore-aware file/module discovery.
- Added startup timing markers around model selection and skill discovery in sdk initialization.
2026-02-15 13:56:40 +01:00
can1357 7ec6668b0b feat(coding-agent): improved skill discovery and hardened hashline edit parsing with type safety
- Improved skill discovery to use native glob pattern matching instead of manual directory traversal, enabling more efficient file discovery with gitignore support.
- Enhanced hashline reference parsing to accept optional leading whitespace and arrow prefixes (>>> or >>), allowing more flexible formatting of hashline references.
- Strengthened type safety in hashline edit formatting by adding runtime type guards and defensive property access for malformed edit objects.
- Fixed skill discovery to extract skill names from directory paths when frontmatter name is missing, improving fallback behavior.
- Updated ajv dependency from ^8.17.1 to ^8.18.0.
2026-02-15 13:40:11 +01:00
can1357 f20a964986 feat(coding-agent): added animated microphone icon and skill discovery via symlinks, improved STT feedback
- Added animated microphone icon with color cycling during voice recording and transcription states.
- Added support for discovering skills via symbolic links in the skills directory.
- Changed STT status messages to display via state change callbacks instead of dedicated status line segment.
- Removed dedicated STT status line segment in favor of animated cursor-based feedback.
- Added cursor override feature to TUI editor for customizing end-of-text cursor glyph with ANSI-styled strings.
2026-02-15 13:37:43 +01:00
can1357 d1f41ae553 merge: PR #51 — speech-to-text with Alt+H (closes #51)
- Moved /stt slash command to 'omp setup stt' CLI command
- Fixed pip install blocking TUI (sync -> async)
- Fixed 'Transcribing...' status not clearing after success
2026-02-15 10:30:47 +01:00
can1357 9e32219a21 fix(stt): address review feedback 2026-02-15 10:23:48 +01:00
can1357 629f0a1d60 fix(stt): added concurrency guard and dispose cancellation for STT controller 2026-02-15 10:23:48 +01:00
can1357 b56e8a72fc fix(stt): set stderr to ignore on recording spawns and removed exists() anti-pattern 2026-02-15 10:23:48 +01:00
daaximus 6969076386 feat(coding-agent): add speech-to-text with Alt+H keybinding
Cross-platform audio recording with automatic tool detection and
fallback chain (SoX > FFmpeg > arecord > PowerShell mciSendString).
Transcription via Python openai-whisper with automatic pip install
on first use.

Recording:
- SoX with explicit waveaudio device on Windows (-t waveaudio 0)
- FFmpeg with auto-detected dshow device name on Windows
- arecord for ALSA on Linux
- PowerShell mciSendString as zero-dependency Windows fallback
- Process health check after spawn, graceful stop for FFmpeg/PS
- Fallback chain: if one tool fails, tries the next automatically

Transcription:
- Python openai-whisper as primary backend (pip install openai-whisper)
- Custom WAV loader in transcribe.py using Python wave module
- Resamples to 16kHz mono via numpy (no ffmpeg dependency)
- Passes float32 numpy array directly to whisper.transcribe()
- 120s timeout with process kill guard

TUI integration:
- Alt+H keybinding to toggle recording (configurable in keybindings)
- /stt command with on|off|status|setup subcommands
- Status line segment showing REC/STT state
- Transcribed text inserted directly into editor prompt
- Lazy controller instantiation on first use

Settings:
- stt.enabled (default: false)
- stt.language (default: en)
- stt.modelName (default: base.en)

New files: packages/coding-agent/src/stt/{downloader,index,recorder,
setup,stt-controller,transcribe.py,transcriber}.ts
2026-02-15 10:23:48 +01:00
can1357 2365a4e8f7 merge: PR #62 (closes #62) 2026-02-15 10:22:47 +01:00
can1357 a155d98f9f feat(coding-agent): auto-switch dark/light theme via SIGWINCH
Replace single `theme` setting with `theme.dark` and `theme.light`.
Auto-detection is always on — COLORFGBG determines which slot to use.
On SIGWINCH, re-check COLORFGBG and switch themes if background changed.
Old `theme` setting auto-migrated using luminance detection.

Fixes #65
2026-02-15 10:20:11 +01:00
can1357 18eae63bb3 fix(coding-agent/debug): accounted for expanded row heights in scroll offset calculation 2026-02-15 09:53:18 +01:00
can1357 eaf267b867 fix(coding-agent): sanitized clipboard copy preview text for TUI display 2026-02-15 09:53:18 +01:00
can1357 1562b21722 fix(coding-agent/debug): limited log file reads to tail 5000 lines / 2MB to prevent OOM 2026-02-15 09:53:18 +01:00
can1357 5ced7791c8 fix(coding-agent/debug): fixed sanitizeText imports from pi-utils to pi-natives 2026-02-15 09:53:18 +01:00
Scott Hyndman be20f44edb feat(tui): Added Alt+Shift+C keyboard shortcut to copy prompt to clipboard 2026-02-15 09:53:17 +01:00
julia 1f8a61ff6a feat(coding-agent/debug): Linked debug report paths as file hyperlinks
- Formatted generated report paths with OSC-8 hyperlinks so terminals can open files directly.
- Reused the hyperlink formatter across performance, bundle, and memory save messages.
2026-02-15 09:53:17 +01:00
julia a2a10561f6 feat(coding-agent/debug): Enabled loading older debug logs from archived files
- Added a DebugLogSource that reads dated log files and feeds the viewer from the debug selector.
- Made load-older handling asynchronous to fetch external chunks while preserving cursor and scroll state.
- Updated log viewer tests for the new options, external log sources, and async loading paths.
2026-02-15 09:53:17 +01:00
julia a866f527b2 feat(coding-agent/debug): Enabled pid filtering and incremental loading in debug viewer
- Added pid filter toggle and load-older pagination controls to the debug log viewer.
- Introduced ctrl+o and enter shortcuts plus load-older row to page earlier logs while keeping the newest 50 visible.
- Adjusted cursor and selection to ignore non-log rows, allow select-all, and keep expansion anchored when rebuilding.
- Parsed pids from JSON log lines, read full log files for viewing, and covered pid filtering and pagination in tests.
2026-02-15 09:53:17 +01:00
julia 3b7c2336c4 feat(coding-agent/debug): Added inline filtering to debug log viewer
- Added case-insensitive substring filtering with inline query entry and visible count line in the debug log viewer.
- Preserved cursor and selection when filters change and show a no matches placeholder with adjusted scroll bounds.
- Updated filter sanitization and frame layout, removing Kitty-specific help text and aligning status counters.
- Expanded tests to cover filtering, selection anchoring, copy payloads, and session boundary warnings.
2026-02-15 09:53:17 +01:00
julia 2047b9ccd1 feat(coding-agent/debug): Added interactive debug log viewer with selection controls
- Replaced the log preview with an interactive viewer supporting navigation, selection, expansion, and clipboard copy.
- Added log formatting helpers to wrap multi-line entries and parse timestamps for session boundary detection.
- Covered viewer selection, copy payload sanitization, expanded formatting, and timestamp parsing with new tests.
2026-02-15 09:53:17 +01:00
julia 8d3fe37ca5 fix(coding-agent/debug): Sanitized debug log rendering
- Sanitized debug log lines by stripping ANSI/control codes, replacing tabs, and truncating to terminal width.
- Added formatting helper and unit tests covering sanitization, tab handling, and truncation.
2026-02-15 09:53:16 +01:00
can1357 918bf9b043 style: formatting 2026-02-15 09:44:56 +01:00
can1357 6cf89113f2 merge: PR #71 (closes #71) 2026-02-15 09:40:45 +01:00
can1357 473e51ff44 merge: PR #70 (closes #70) 2026-02-15 09:40:45 +01:00
can1357 3a260068dc fix(rpc): added optional images parameter to abort_and_prompt command 2026-02-15 09:39:47 +01:00
can1357 dc0a126dd0 fix(coding-agent): guarded prompt setup race in abort_and_prompt with generation counter 2026-02-15 09:39:47 +01:00
can1357 9b8e69a0a0 fix(test): filtered user extension errors and awaited async dispose in afterEach 2026-02-15 09:39:34 +01:00
can1357 107d5bfae4 fix(coding-agent): changed todo.reminders default to false to prevent subagent interference 2026-02-15 09:39:19 +01:00
can1357 a2334b5acf fix(docs): added missing 'start' reason to custom-tool session event docs 2026-02-15 09:25:09 +01:00
can1357 8526491221 fix(task): filtered todo_write from active tools instead of full registry at subagent startup 2026-02-15 09:23:04 +01:00
can1357 d7711748b6 fix(coding-agent): called abort before extension callbacks on TTSR interruption and excluded aborted streams from retry guard 2026-02-15 09:19:17 +01:00
can1357 3b890dbc9a fix(task): filtered parent-owned tools from subagent setActiveTools handler 2026-02-15 09:18:07 +01:00
Chris Watson 1ece498a17 feat(coding-agent): expose runtime lifecycle signals to extensions and custom tools
Also stabilizes extension/skills test suites by isolating user-installed extensions and tightening skill source gating.
2026-02-15 09:13:57 +01:00
Chris Watson 1ce11f0d02 Update packages/coding-agent/src/prompts/system/plan-mode-approved.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-15 09:13:56 +01:00
Chris Watson 315aa32115 fix(coding-agent): improve todo progress tracking reliability 2026-02-15 09:13:56 +01:00
luk 04556b44a5 feat(coding-agent/rpc): add abort_and_prompt command
New RPC command that atomically aborts the current turn and starts
a new one with the given message, avoiding the race condition of
separate abort + wait + prompt calls.

Fix session.abort() not clearing promptInFlight flag due to
microtask ordering (waitForIdle resolves before promptWithMessage
finally block), which left isStreaming true and blocked subsequent
prompts.
2026-02-15 09:13:54 +01:00
can1357 35aa15ae94 fix(stats): generated tar bundle for compiled dashboard assets
Generate a tar.gz bundle from stats dist/client during binary builds, embed it into the compiled binary, and extract/serve it at runtime in compiled mode instead of reading //root/client directly.

Updated CI and build:binary flow to generate/reset the embedded bundle around compilation.

Fixes #61
2026-02-15 07:23:40 +01:00
can1357 0a27cbcc9d chore: bump version to 12.4.0 2026-02-14 03:25:32 +01:00
can1357 2e33e436b4 feat: switched to native text sanitization, removed Bun.stripANSI
- Added `sanitizeText` function to pi-natives that strips ANSI escape sequences, removes control characters and lone surrogates, and normalizes line endings.
- Moved `sanitizeText` function from `@oh-my-pi/pi-utils` to `@oh-my-pi/pi-natives` for better code organization and native performance.
- Added line length clamping (4000 characters) to bash and Python execution output to prevent excessively long lines.
- Replaced internal `#normalizeOutput` methods with `sanitizeText` utility function in bash and Python execution components.
- Fixed bash interactive tool to gracefully handle malformed output chunks by normalizing them with `sanitizeText`.
- Simplified documentation by removing WASM terminology from package descriptions and comments.
2026-02-14 03:25:13 +01:00
can1357 2aa156060b feat(coding-agent/memories): isolated memory storage by project working directory to prevent cross-project contamination
- Modified memory storage to isolate memories by project working directory, preventing cross-project memory contamination.
- Added encodeProjectPath function to safely encode working directory paths for use in memory storage directory names.
- Updated getMemoryRoot function to accept cwd parameter and include encoded project path in memory directory structure.
- Updated clearMemoryData function signature to accept cwd parameter for project-specific memory cleanup.
- Updated test fixtures to use project-aware memory root paths.
2026-02-14 02:35:56 +01:00