Commit log

5e366e1 no need to check cancelled ctx

Vadim Inshakov created

65fe42e chore(legal): @tauraamui has signed the CLA

Charm created

0a2da7c v0.7.9

Andrey Nering created

d78ed25 fix: add back init setting ulimit

Click to expand commit body
this was removed in a merge conflict in #1011

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

Carlos Alexandro Becker created

46a3a37 feat: optimize LSP file watcher and ignore files (#959)

Click to expand commit body
* refactor: centralize file watching with single fsnotify.Watcher

Refactored the LSP watcher system to use a single shared fsnotify.Watcher
instance instead of one per LSP client, eliminating all file watching
duplication and significantly improving resource efficiency.

Key changes:
- Added GlobalWatcher singleton managing single fsnotify.Watcher
- Centralized all file system event processing and distribution
- Eliminated duplicate directory and file watching across clients
- Implemented global debouncing with per-client event filtering
- Maintained full backward compatibility with existing LSP integration

Benefits:
- Single watcher instance regardless of LSP client count
- Each directory/file watched exactly once
- Centralized event processing eliminates duplicate operations
- Significant reduction in file descriptors and memory usage
- Linear resource growth with unique files, not client count

💖 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>

* docs: clarify directory-only watching strategy

Enhanced documentation and comments to clearly explain that the file
watcher implementation only watches directories, not individual files.
This approach is more efficient as fsnotify automatically provides
events for all files within watched directories.

Key clarifications:
- Added comprehensive documentation explaining directory-only approach
- Clarified that fsnotify automatically covers files in watched directories
- Enhanced comments explaining new directory detection and handling
- Added test to verify only directories are watched, never individual files
- Improved code organization and readability

Benefits of directory-only watching:
- Significantly fewer file descriptors used
- Automatic coverage of new files created in watched directories
- Better performance with large codebases
- Simplified deduplication logic

💖 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>

* refactor: remove unnecessary directory tracking, rely on fsnotify deduplication

Simplified the GlobalWatcher by removing manual directory tracking since
fsnotify handles deduplication internally. According to fsnotify docs:
"A path can only be watched once; watching it more than once is a no-op"

Key improvements:
- Removed watchedDirs map and associated mutex (no longer needed)
- Simplified addDirectoryToWatcher method to directly call fsnotify
- Updated tests to verify fsnotify deduplication behavior
- Reduced memory usage and code complexity
- Maintained all functionality while relying on fsnotify's built-in deduplication

Benefits:
- Less memory usage (no directory tracking map)
- Simpler code with fewer mutexes and less complexity
- Relies on well-tested fsnotify deduplication instead of custom logic
- Better performance due to reduced synchronization overhead

💖 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>

* refactor: remove workspace path tracking, embrace full idempotency

Removed unnecessary workspace path tracking since directory walking
and fsnotify.Add() calls are idempotent. Multiple WatchWorkspace calls
with the same path are now safe and simple.

Key improvements:
- Removed workspacePaths map and workspacesMu mutex
- Simplified WatchWorkspace to be fully idempotent
- Reduced GlobalWatcher struct size and complexity
- Updated tests to verify idempotent behavior instead of deduplication
- Embraced "simple and idempotent" over "complex and optimized"

Benefits:
- Even less memory usage (no workspace tracking)
- Simpler code with fewer mutexes (down to 2 from original 4)
- Fully idempotent operations - safe to call multiple times
- Better maintainability with less state to manage
- Relies entirely on fsnotify's proven deduplication

Philosophy: Let fsnotify handle what it's designed to handle, keep our
code simple and idempotent rather than trying to micro-optimize.

💖 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>

* refactor: remove redundant file type validation in file opening

Removed duplicate file extension checking since HandlesFile() already
validates that the LSP client handles the file type. This eliminates
redundant hardcoded extension checks and potential inconsistencies.

Key improvements:
- Removed shouldOpen extension validation logic
- Simplified file opening to trust HandlesFile() validation
- Eliminated hardcoded extension lists that could become stale
- Reduced code duplication between global_watcher.go and watcher.go
- More consistent behavior across different file opening paths

Benefits:
- Single source of truth for file type handling (LSP client config)
- Less code to maintain and keep in sync
- More flexible - supports any file types configured for LSP clients
- Eliminates potential bugs from hardcoded extension mismatches
- Cleaner, more maintainable code

The file type validation now happens exactly once at the right place:
when checking if a client HandlesFile(), not again during file opening.

💖 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>

* feat: add hierarchical .gitignore/.crushignore support to LSP file watcher

Implements proper hierarchical ignore file support that checks for .gitignore
and .crushignore files in each directory from the target path up to the
workspace root, following Git's ignore semantics.

Key improvements:
- Hierarchical ignore checking: walks directory tree from workspace root to target
- Supports both .gitignore and .crushignore patterns
- Handles trailing slash patterns correctly (e.g., "node_modules/" matches directories)
- Uses go-gitignore library for proper pattern matching
- Maintains workspace root tracking for multi-workspace support
- Comprehensive test coverage for ignore functionality

This ensures the LSP file watcher respects ignore patterns at all directory
levels, not just the workspace root, providing consistent behavior with Git
and other tools that support hierarchical ignore files.

💖 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>

* chore: small improvement

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* refactor: simplify global watcher to single workspace

Remove multi-workspace concept that was never used in practice.
All LSP clients watch the same single workspace directory, so the
complexity of tracking multiple workspace roots was unnecessary.

Changes:
- Replace workspaceRoots map with single workspaceRoot string
- Remove unnecessary mutex protection (workspace set once at startup)
- Simplify shouldIgnoreDirectory logic
- Update tests to match simplified structure

💖 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>

* refactor: major simplification of file watcher logic

Remove unnecessary complexity and consolidate duplicate code:

- Remove unnecessary watcherMu mutex (watcher set once at init)
- Consolidate duplicate file opening logic between GlobalWatcher and WorkspaceWatcher
- Simplify AddRegistrations by removing complex workspace scanning
- Replace custom glob matching with proven doublestar library
- Remove unused shouldExcludeDir function
- Streamline file preloading to only handle high-priority files

Benefits:
- ~200 lines of code removed
- Better reliability using doublestar for pattern matching
- Improved performance with event-driven approach vs bulk scanning
- Single source of truth for file operations
- Reduced memory usage and fewer goroutines

💖 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>

* refactor: more cleanup

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* refactor: use csync

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* refactor: renaming some methods/structs

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* refactor: simplify

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: errs/logs

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* refactor: simplify LSP watcher architecture and improve organization

- Rename WorkspaceWatcher to Client for clarity
- Add Start() function for one-time global watcher setup
- Extract ignore file logic to separate ignore.go module
- Add thread-safe csync.String type with comprehensive tests
- Simplify startup flow by initializing watcher once in app.go
- Improve naming consistency (getGlobalWatcher → instance, etc.)

💖 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>

* chore: remove unused csync strings utilities

💖 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* docs: add semantic commit guidelines to development guide

💖 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>

* fix: exclude .git directories from LSP file watching

Explicitly exclude .git directories from file system watching to improve
performance and avoid unnecessary events from Git operations.

💖 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>

* refactor: use fsext

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: grep

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* merge

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Crush <crush@charm.land>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Carlos Alexandro Becker , Crush , and Copilot created

8695113 fix: esc key not being recognized

Ayman Bagabas created

fc9cdc4 chore(legal): @SubodhSenpai has signed the CLA

Charm created

df2e64e refactor(fsext): improve hierarchical ignore handling and consolidate file exclusion logic (#999)

Click to expand commit body
* refactor(fsext): improve hierarchical ignore handling and consolidate file exclusion logic

- Refactor FastGlobWalker to use directoryLister for consistent ignore handling
- Add ShouldExcludeFile function for unified file exclusion checking
- Add WalkDirectories function for directory traversal with ignore support
- Improve directory pattern matching by checking both with and without trailing slash
- Add comprehensive tests for hierarchical ignore behavior and common patterns
- Remove direct dependency on go-gitignore in favor of existing directoryLister implementation

💖 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>

* fix: improvements

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* chore: t.Context()

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Crush <crush@charm.land>

Carlos Alexandro Becker and Crush created

442867d chore: bump bubbletea/ultraviolet to enable bracketed paste on windows (#1003)

Click to expand commit body
This trades enhanced keyboard with bracketed paste on Windows. This is due to some limitations in the Windows Console API and VT input mode and bracketed paste.

Ayman Bagabas created

78540b0 security(sqlite): enable `secure_delete` pragma (#966)

Click to expand commit body
Co-authored-by: Nuno Cruces <ncruces@users.noreply.github.com>

bbrodriges and Nuno Cruces created

c94c67d chore(legal): @adriens has signed the CLA

Charm created

a935301 chore(legal): @vadiminshakov has signed the CLA

Charm created

65d8269 refactor: check for id instead of name

Andrey Nering created

913ea55 fix(openrouter): fix api key validation for openrouter (#997)

Click to expand commit body
`/models` is accessible for everyone on OpenRouter, without the need for
any authorization. The `Authorization: Bearer *` was basically always
ignore by their API.

Using a different private API to validate the key for OpenRouter.

Andrey Nering created

92552fe ci: disable `lint-sync` for now

Andrey Nering created

a24079e chore(deps): bump actions/setup-go from 5 to 6 in the all group (#991)

Click to expand commit body
Bumps the all group with 1 update: [actions/setup-go](https://github.com/actions/setup-go).


Updates `actions/setup-go` from 5 to 6
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

dependabot[bot] and dependabot[bot] created

60d8510 fix: handle no content for gemini provider

Kujtim Hoxha created

39de90f chore(legal): @shaitanu has signed the CLA

Charm created

c10748b chore(deps): update catwalk to v0.5.3 (#949)

Andrey Nering created

1ab4d28 chore(deps): update mvdan.cc/sh (#948)

Click to expand commit body
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

Carlos Alexandro Becker created

4d3b1d9 chore(legal): @tisDDM has signed the CLA

Charm created

d83ad6b chore(legal): @andersonjoseph has signed the CLA

Charm created

e76fd54 fix: tool calls break the converation if interrupted.

Manolo Santos created

a2e89c8 chore: `IsSubset` was moved to `x/exp/slice` (#923)

Andrey Nering created

72dc566 sec: show persistent shell path in permission dialog (#916)

Click to expand commit body
Currently it will always show the path of when it was started.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

Carlos Alexandro Becker created

2ba1047 chore(legal): @undo76 has signed the CLA

Charm created

e0733b5 ci: rename "issue labeler" to just "labeler" (because it also labels prs)

Andrey Nering created

48553e1 chore(labeler): adjust xai grok label

Andrey Nering created

b42b1b6 chore: lint

Kujtim Hoxha created

2b1d87d fix: handle providers that do not send the right index

Kujtim Hoxha created

fb459f4 v0.7.3

Andrey Nering created

71bca98 fix: assistant message

Kujtim Hoxha created

0c8e111 fix: openai provider tool calls

Kujtim Hoxha created

d69dcc1 chore(labeler): add shell label

Andrey Nering created

c917b68 chore(legal): @negz has signed the CLA

Charm created

4de15c2 v0.7.2

Andrey Nering created

8d735d6 refactor: home.Dir, home.Short, home.Long (#884)

Click to expand commit body
* refactor: home.Dir, home.Short, home.Long

Centralized all home-related operations in a package and removed a bunch
of repeated code all over the place.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* test: more cases

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: more places

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* test: fix on windows

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* test: fix

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* test: fix

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

Carlos Alexandro Becker created

3b9babb fix(lsp): simplify init/ping, store capabilities (#713)

Click to expand commit body
* fix(lsp): simplify init/ping

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* feat(lsp): store server capabilities

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix(lsp): improve init

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix(lsp): cancel request id

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

Carlos Alexandro Becker created

e2e99af chore: run `modernize` (#906)

Andrey Nering created

40599a0 fix(filepicker): general fixes to size and position

Click to expand commit body
* The image and dialog are now rendered at a fixed height. Before, the
  height could change as you navigate, which did not look well in
  practice.
* We'll now hide the preview if the terminal height is not enought for
  it.
* Better position. Before, in some scenarios the dialog was been rendered
  too close to the bottom, instead of centered.

Andrey Nering created

68adc06 chore: fix typo in constant name

Andrey Nering created

a378eb0 feat: show path when asking if the user wants to initialize project (#867)

Andrey Nering created

d01ef3e fix: fix goroutine panic due to waiting for channel for too long

Click to expand commit body
We need to give up if the context was canceled.

Fixes #100

Andrey Nering created

5bdccdf fix: fix panic with gemini via litellm

Click to expand commit body
Fixes #901

Andrey Nering created

4bd2cdd fix: fix `panic` that happens on `crush run` with tool calls

Click to expand commit body
We need to track the number of read bytes per message.

Fixes #871

Andrey Nering created

15b989c fix(tui): further guard against type accessor and map panics (#783)

Christian Rocha created

9bf5410 chore: group dependabot updates to reduce noise

Andrey Nering created

3fab905 chore(dependabot): remove `docker` as we don't have docker for now

Andrey Nering created

a65efa5 fix: validate resolved url

Kujtim Hoxha created

2c71f23 fix: resolve the baseurl for anthropic

Kujtim Hoxha created