Commit Graph
20 Commits
Author SHA1 Message Date
79a954c16e Add Claude Code Session ID widget (#111)
* feat: Add Claude Session ID widget

* Add ClaudeSessionIdWidget to widget registry, add label, support raw mode, fix cross-platform issues by using session ID directly from statusline JSON

---------

Co-authored-by: Marty <marty@croakingtoad.com>
Co-authored-by: Matthew Breedlove <matt@revenite.ai>
2025-11-17 16:56:59 -05:00
da325930ad Fix: Dynamic context window calculation for Sonnet 4.5 (1M tokens) (#107)
* Fix: Dynamic context window calculation for Sonnet 4.5 (1M tokens)

- Create model-context utility with dynamic context window mapping
- Sonnet 4.5 models now use 1M context (800k usable)
- Older models default to 200k context (160k usable)
- Update ContextPercentage and ContextPercentageUsable widgets
- Update renderer.ts flex mode calculations (2 locations)
- Add comprehensive test coverage (14 new tests, 36 total passing)

Fixes incorrect percentage display for Sonnet 4.5:
- Before: 42k tokens showed 21.0% (using 200k denominator)
- After: 42k tokens shows 4.2% (using 1M denominator)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Style: Apply ESLint auto-fixes for consistency

- Standardize indentation to 4 spaces
- Apply formatting rules from eslint.config.js
- No logic changes, formatting only

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Refactor: Code review fixes for context window changes

- Fix misleading test name (line 69 of context-percentage.test.ts)
- Strengthen model ID pattern matching (claude-sonnet-4-5 vs sonnet-4-5)
- Standardize export style (inline export for consistency)

All tests passing (19/19 for affected files)
TypeScript and ESLint checks passed

* Enhance CLAUDE.md: Update piped input example for Sonnet 4.5 and add test commands

- Changed piped input example to reflect the new model ID for Claude 4.5
- Added instructions for running tests and tests in watch mode
- Updated context window metrics description to include dynamic model-based context windows

Improves clarity and usability for developers working with the project.

* Fix: Require [1m] suffix for Sonnet 4.5 1M context window detection

Address PR feedback that Sonnet 4.5 only has 1M context on API usage
when the model ID includes the [1m] suffix (long context beta access).

Changes:
- Update getContextConfig() to check for [1m] suffix (case-insensitive)
- Models without suffix now safely default to 200K context
- Add comprehensive test coverage for suffix detection
- Update all test fixtures to use correct model ID format
- Document suffix requirement in CLAUDE.md

This ensures conservative behavior - only models with explicit [1m]
suffix receive 1M context allocation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-13 08:53:54 -05:00
d23af975b2 feat: Add fish-style path abbreviation to CurrentWorkingDir widget (#80)
* feat: Add fish-style path abbreviation to CurrentWorkingDir widget

- Added new toggle option for fish-style path abbreviation
- Keeps home directory as ~, first and last directories complete
- Abbreviates middle directories to first letter only
- Preserves dot for hidden directories (e.g. .config → .c)
- Maintains backward compatibility with segments feature
- Both options are mutually exclusive (fish-style takes precedence)

Example: ~/Documents/Projects/my-project → ~/D/P/my-project

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Modify cwd widget fish-style code to use handleEditorAction instead of renderEditor, misc lint fixes

---------

Co-authored-by: Jishuai <aqianlikuaizaifeng@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
2025-09-19 01:25:16 -04:00
Jake NelsonandGitHub 2ecaf023b7 feat: add remaining mode to context % widgets (#83) 2025-09-17 22:34:41 -04:00
Matthew Breedlove b36ac6c202 Fix SessionClock to show '0m' if we don't have a calculated session duration (empty jsonl) 2025-09-11 12:49:10 -04:00
Her0mAn 5b351548a4 Fix cwd segment setting not working as expected on Windows 2025-09-08 22:47:02 +08:00
Matthew Breedlove 17b2576cca Support emoji input for custom text 2025-08-31 02:47:02 -04:00
Matthew Breedlove 0a81688010 Added toggle to hide 'no git' message if not in a git repository. Fixes #48 2025-08-27 11:03:05 -04:00
7886e1f376 feat(git-worktree): Add git worktree widget (#49)
* feat(git-worktree): Add git worktree widget

* Minor cleanup

---------

Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
2025-08-27 10:22:43 -04:00
Matthew Breedlove 077dc0f5eb Imports cleanup 2025-08-26 23:32:47 -04:00
Matthew Breedlove ce768e541a Add session cost widget 2025-08-21 01:41:05 -04:00
Matthew Breedlove f218a6a445 Enable raw mode for Current Working Dir widget 2025-08-21 01:40:30 -04:00
Matthew Breedlove 3aea75403f Add Current Working Dir component 2025-08-21 01:28:17 -04:00
Matthew Breedlove 479e139141 Windows fixes for git widgets 2025-08-20 03:09:20 -04:00
Matthew Breedlove 27632788a5 Fixes for block timer lookback 2025-08-20 03:08:57 -04:00
Matthew Breedlove 670463731f Fix for block timer raw mode preview when showing progress bar 2025-08-18 04:14:12 -04:00
Matthew Breedlove eaf62c349d Fix for custom command edit / width / timeout keypresses not working 2025-08-18 03:48:33 -04:00
Matthew Breedlove d1ba0c0be5 Adding block timer widget, miscellaneous UI improvements 2025-08-18 02:40:34 -04:00
Matthew Breedlove 7782e8b455 Add descriptive error handling to CustomCommand, update README, fix Uninstall Emoji that was rendering incorrectly, fix Item Editor line color for consistency, fix version number display 2025-08-17 20:15:54 -04:00
Matthew Breedlove 365b64092a Powerline capability, better color support, custom colors, multiple install options, Output Style widget, UI cleanup 2025-08-17 04:12:34 -04:00