Enhance command-based content type inference and distillation logic#56
Merged
Enhance command-based content type inference and distillation logic#56
Conversation
…tent types from shell commands
…illation logic in pipeline hooks
…abase cleanup, and improve scorer content classification logic
…tch with command-based registry resolution and removing unused distillers.
…tions table and improve error logging for insertion failures
…or distilled content
…nd update cost estimation logic
… CLI, guard, and hook modules
… and update command name resolution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Auto Describe
Summary
This PR overhauls Omni's core pipeline and CLI stack, replacing the legacy content-type classification model with command-aware routing, cleaning up deprecated code, and streamlining user-facing reporting and performance.
Key Changes
omni statsCLI: removed--by-typeflag, added--projectper-project analyticsDetailed Breakdown
Core Pipeline Overhaul
src/pipeline/classifier.rslegacy content classifiercontent_type()fromDistillertrait, replacedget_distiller()with command-baseddistill_with_command()insrc/distillers/mod.rsinfra.rs,log.rs,tabular.rscollapse.rsto useCollapseModeenum instead of ContentType for content-aware collapsingsrc/pipeline/composer.rs, moving rewind/learning logic directly into hook codeCLI & Stats Updates
src/cli/stats.rs: Removed--by-typemode, added--projectflag for per-project stats, reworked default view to show top commands, updated JSON output to return command stats instead of content-type datasrc/guard/config.rsinit.rs,session.rs,stats.rsto Englishtruncate_commands()function and associated testsbenches/pipeline.rsfrombench_classifytobench_registry_resolvetestingscorer::score_with_commandHook & Runtime Changes
src/hooks/pipe.rsandsrc/hooks/post_tool.rs: removed classifier calls, added auto-sibling command detection for pipe mode, updated rewind/route logic and auto-learn triggerssrc/guard/config.rsfor loading user pricing/config settingssrc/main.rsto detect pipe commands via env vars, added background DB cleanup threadomni_searchtool insrc/mcp/server.rssrc/cli/doctor.rsNotes
Breaking Changes
pipeline::classifier::classify,distillers::get_distiller(), and deprecatedContentTypeenum usage across core code--by-typeflag fromomni stats; JSON output now returnscommandsinstead ofcontent_typesDistillertrait no longer includes thecontent_type()methodLast updated: 2026-04-12 04:30:58