Commit Graph

69 Commits

Author SHA1 Message Date
9b7cbd5244 fix: resolve doctest failures, database bugs, and remove dead code
- Fix all 96 doctest failures across 20 files by adding hidden imports and
  proper test setup (68 pass, 33 intentionally ignored)
- Fix set_item_tags: wrap in transaction and replace item.id.unwrap() with
  proper error handling
- Fix get_items_matching: replace N+1 per-item meta queries with batch
  get_meta_for_items() call
- Fix get_item_matching: apply meta filtering instead of ignoring the parameter
- Remove duplicate doc comment in store_meta
- Remove dead code files: plugin.rs, plugins.rs, binary_detection.rs
  (never declared as modules)
- Apply cargo fmt formatting fixes
- Add keep.db to .gitignore
2026-03-12 11:58:44 -03:00
8a8a6e1c4b fix: correct critical bugs and improve pipe streaming performance
Critical bug fixes:
- save_item now returns real Item from database, not a hardcoded fake
- AsyncDataService::save() reuses self.sync_service instead of creating redundant instance
- GenerateStatus trait signature mismatch fixed (CLI/API decoupling)

Performance improvements (pipe path untouched):
- CompressionEngine::open() returns Box<dyn Read + Send> enabling true streaming
- mode_get eliminates triple full-file read (was sampling then re-reading entire file)
- FilteringReader adds fast-path bypass when no filters, pre-allocates temp buffer
- text.rs meta plugin processes &[u8] slice directly, eliminates data.to_vec() clone

API correctness:
- Tag parse errors now return 400 instead of being silently discarded
- compute_diff uses similar crate (LCS-based) instead of naive positional comparison

Cleanup:
- Modernize string formatting (format!({x})) across codebase
- Remove redundant DB query in get mode
- Derive Debug/ToSchema on public types
- Delete placeholder test files with no real assertions
- Extract parse_comma_tags utility function
2026-03-11 20:45:05 -03:00
Andrew Phillips
fdeb5f7951 Ugh 2026-02-19 13:57:39 -04:00
Andrew Phillips
a72395fe83 refactor: simplify filter plugin interface to use &mut dyn Read/Write 2025-09-15 17:42:35 -03:00
Andrew Phillips
82ec29f6a1 fix: resolve compilation errors by standardizing filter signatures and fixing ownership issues
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-12 12:28:51 -03:00
Andrew Phillips
9b85af439d refactor: update filter plugins to use boxed reader/writer parameters
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-12 11:56:11 -03:00
Andrew Phillips
0be54abe60 fix: resolve compilation errors and warnings
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-12 11:55:04 -03:00
Andrew Phillips
059bde09e4 refactor: simplify filter plugin signatures by removing boxed parameters 2025-09-12 10:36:09 -03:00
Andrew Phillips
a20f651c01 fix: Apply cfg_attr to fix conditional derive and schema attribute
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 18:16:48 -03:00
Andrew Phillips
6a4936d8d4 refactor: Conditionalize utoipa and flate2 based on features
Conditionalize `utoipa::ToSchema` derives and `#[schema]` attributes on the `server` feature, and `flate2` usage on the `gzip` feature, allowing compilation when these features are disabled.

Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 17:21:48 -03:00
Andrew Phillips
e9ab630a74 docs: Add rustdoc for filter_plugin, binary_detection, and lib.rs
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 15:48:54 -03:00
Andrew Phillips
3ddecc9ed5 docs: Add comprehensive Rustdoc for ExecFilter and its methods
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 15:12:49 -03:00
Andrew Phillips
f3a4894699 docs: Add Rustdoc comments for info and mcp modules and grep plugin
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 14:30:54 -03:00
Andrew Phillips
88c7290a7b docs: Add comprehensive documentation for modes, services, and plugins
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 14:29:16 -03:00
Andrew Phillips
c145974ce3 docs: Add Rustdoc comments to CompressionService methods
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 12:45:32 -03:00
Andrew Phillips
e4fc653397 docs: Add comprehensive Rustdoc comments to public APIs
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 12:36:41 -03:00
Andrew Phillips
cb716c161c docs: Document arguments and returns for utility and filter functions
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-10 10:59:29 -03:00
Andrew Phillips
25b99b938e docs: Add rustdoc comments for functions, structs, and traits
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 10:52:31 -03:00
Andrew Phillips
ec4dfed2be feat: add skip_bytes, skip_lines, and strip_ansi filters
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 10:49:33 -03:00
Andrew Phillips
3f1c9265fe docs: Add rustdoc to filter plugin modules and arguments
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 10:48:50 -03:00
Andrew Phillips
edfe0fcd6e docs: Add comprehensive rustdoc to filter plugin modules
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 10:46:39 -03:00
Andrew Phillips
a528f47a14 fix: Declare filter_plugin module before its usage
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 10:39:06 -03:00
Andrew Phillips
ad376c40f1 feat: add exec filter plugin for external command execution
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 10:13:17 -03:00
Andrew Phillips
832330f31b feat: Add type and module reorganization for Services, Modes, Meta and Filter Plugins
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 09:39:22 -03:00
Andrew Phillips
e1402807c4 feat: Register skip and tail filter plugins
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-03 09:36:13 -03:00
Andrew Phillips
a76f3bfc56 refactor: Remove unused options method from SkipBytesFilter 2025-09-03 09:36:12 -03:00
Andrew Phillips
21f195d8f6 refactor: Use plugin registry for filter service discovery
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-03 09:31:05 -03:00
Andrew Phillips
96deafbf78 feat: Add pest and pest_derive dependencies 2025-09-03 09:31:04 -03:00
Andrew Phillips
5e866c7cbf fix: Resolve compilation errors with FilterOption and type mismatches
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-03 09:18:38 -03:00
Andrew Phillips
3524a12ffd fix: Resolve compilation errors related to status and filter plugins
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-03 09:13:26 -03:00
Andrew Phillips
58bb70a2a4 fix: Implement missing options trait for filter plugins
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-03 08:34:48 -03:00
Andrew Phillips
6d05859954 fix: Import FilterOption and implement options method for all filters
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-03 08:33:51 -03:00
Andrew Phillips
254ac6359b refactor: Unify filter plugin creation and option handling
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-03 08:26:44 -03:00
Andrew Phillips
bd2a8af186 feat: Implement structured filter options with FilterOption trait
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-03 08:24:55 -03:00
Andrew Phillips
71d7ec0851 feat: Implement clone_box for head, tail, and skip filters
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-03 07:51:01 -03:00
Andrew Phillips
19188fabb9 feat: Implement clone_box for StripAnsiFilter and GrepFilter
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-03 07:49:53 -03:00
Andrew Phillips
feb508bf27 feat: Implement Clone for Box<dyn FilterPlugin>
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-03 07:48:31 -03:00
Andrew Phillips
8c50af2246 fix: Implement Clone for FilterChain manually
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-03 07:48:00 -03:00
Andrew Phillips
2abdf5f2d9 feat: Make FilterChain clonable
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-03 07:47:14 -03:00
Andrew Phillips
2e62878acb fix: Resolve compilation errors with missing imports and closure moves
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-03 07:34:13 -03:00
Andrew Phillips
3ed54ce6b3 fix: Correct streaming content parameters and update deprecated macro
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-02 18:31:42 -03:00
Andrew Phillips
c55527ea6a feat: Implement new filter syntax with JSON options for all filter plugins
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-02 18:24:09 -03:00
Andrew Phillips
9b7751fa50 refactor: Use strum for filter plugin type determination
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-02 17:26:55 -03:00
Andrew Phillips
95b703b301 fix: Remove mut from trait method parameters
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-02 17:02:57 -03:00
Andrew Phillips
5232e7d866 fix: Make reader and writer mutable in FilterPlugin and implementations
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-02 17:01:51 -03:00
Andrew Phillips
f527dfc83b fix: Adjust filter trait and implementations for mutable boxed I/O
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-02 16:33:53 -03:00
Andrew Phillips
288ab8a74d fix: Correct filter trait and chain implementation for mutability
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-02 16:32:18 -03:00
Andrew Phillips
1cc1ccf15e refactor: Update FilterPlugin methods to use boxed Read/Write traits
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-02 16:26:13 -03:00
Andrew Phillips
4a1c3f6c92 fix: Make FilterPlugin trait object-safe and update implementations
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-02 16:24:04 -03:00
Andrew Phillips
e7cae3d12f refactor: Simplify filter plugin return values and apply io::copy directly
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-09-02 12:40:28 -03:00