Releases: thavionai/optimize-pilot
Release list
v0.1.0 — Two-way token optimization
Inspired by RTK: optimize-pilot now compresses both ends of the token pipeline — your prompts and command/tool output — while keeping the same deterministic, no-model-call, meaning-preserving contract.
Highlights
- Output compression —
compressOutputengine +compress_outputMCP tool: strips ANSI/progress noise, collapses exact-repeat lines into… (×N), truncates oversized output to head+tail. Never paraphrases. Typically 50–90% on noisy logs. - Automatic Bash-output compression (Claude Code) — a
PostToolUsehook compresses long command output before it enters context. Install once, no per-call invocation. (Prompt-text rewriting isn't possible via hooks, so input compression stays on the explicit@optimize//optimizepath.) - Custom rules (
promptOptimizer.customRules) — your ownfind → replacemappings (literal or regex) alongside the ~120 built-ins. /discover+optimize_discover— dry-run report of tokens saved and per-rule-group attribution, no model call.- Lifetime savings — VS Code "Show Lifetime Token Savings" command +
/optimize-stats(à la RTK'sgain). - Log attachments (
promptOptimizer.compressAttachmentLogs) —.log/.out/.errget output compression; code/JSON/YAML still byte-for-byte. - Standalone CLI (
claude/cli.js) —noisy-cmd 2>&1 | optimize-pilot,--prompt,--discover. - Homebrew formula (
Formula/optimize-pilot.rb). - Fix — filler removal now runs before contractions, so phrases like "it is important to note that" are stripped (previously leaked as "it's …").
Install
- VS Code: download
optimize-pilot-0.1.0.vsixbelow →code --install-extension optimize-pilot-0.1.0.vsix - Marketplace: https://marketplace.visualstudio.com/items?itemName=thavionai.optimize-pilot
34/34 unit tests passing.
v0.0.9 — attachments
Folds attached files into the request — where the real token savings are.
Added
promptOptimizer.includeAttachments(on by default): files attached with#are now forwarded to the model (previously the participant silently dropped them).- Prose files (
.md,.txt,.rst, …) are compressed with the same engine. - Code / structured data (
.ts,.py,.json,.yaml, …) is preserved byte-for-byte — trimming code is risky (whitespace is syntax in some languages) and low-value. - Token before/after now covers the whole prompt + attachments bundle.
- Binary files and files >512 KB are skipped.
- Prose files (
26 tests passing. Install the attached .vsix via "Install from VSIX…", or update from the Marketplace.
v0.0.8 — response brevity
Adds a feature that cuts output tokens — usually the bulk of a chat's cost.
Added
promptOptimizer.responseBrevity(off by default): appends a short "answer concisely" instruction to the forwarded prompt, so the model returns a shorter response. This saves far more than input compression on typical prompts.promptOptimizer.brevityInstruction: customize the instruction text; empty uses the built-in default.
The reported token savings still reflect input compression only (the brevity instruction shapes output, not input), so the figure stays honest. A new "Response brevity: on" line appears when enabled.
22 tests passing. Install the attached .vsix via "Install from VSIX…", or update from the Marketplace.
v0.0.7 — contractions
Adds a contractions optimization pass.
Added
- New `promptOptimizer.contractions` setting (on by default). Contracts two-word phrases to save tokens:
- `do not` → `don't`, `does not` → `doesn't`, `cannot`/`can not` → `can't`, `will not` → `won't`
- `it is` → `it's`, `that is` → `that's`, `there is` → `there's`, `what is` → `what's`
- `you are` → `you're`, `we are` → `we're`, `I am` → `I'm`
- `I will` → `I'll`, `you would` → `you'd`, `we have` → `we've`
- Guards `have to` (= must) so it's never mangled.
Applies to almost every prompt. 22 tests passing; code blocks untouched. Install the attached `.vsix` via "Install from VSIX…", or update from the Marketplace.
v0.0.6 — more reductions & framing removal
More local optimization rules.
Added
- De-nominalizations: `make a comparison between` → `compare`, `provide a description of` → `describe`, `give rise to` → `cause`, `put emphasis on` → `emphasize`, `take a look at` → `review`, `have an impact on` → `affect`, `make changes to` → `change`.
- Causation / basis: `as a result of` → `because of`, `on the basis of` → `based on`, `in order for` → `for`.
- Prompt / instruction framing removed: `your job is to`, `my goal is to`, `I was hoping you could`, `would it be possible to`, `what I mean is`.
- More filler: `by and large`, `to tell you the truth`, `do me a favor and`, `as far as I'm concerned`.
20 tests passing. Code blocks/inline spans untouched. Install the attached `.vsix` via "Install from VSIX…", or update from the Marketplace.
v0.0.5 — more optimization rules
Expanded the local optimization rule set.
Added
- De-nominalizations: `make a decision` → `decide`, `provide an explanation for` → `explain`, `is dependent on` → `depends on`, `come to the conclusion that` → `conclude that`.
- More synonym swaps: `the way in which` → `how`, `a wide variety of` → `various`, `all of the` → `all the`, `a total of` → removed, `in spite of` → `despite`, `in regards to` → `regarding`.
- More filler removal: `the bottom line is`, `as previously mentioned`, `that being said`, `for all intents and purposes`.
- More politeness: `at your earliest convenience`, `when you get a chance`.
- New hedges group: removes empty intensifiers (`very`, `really`, `quite`, `kind of`, `sort of`, `pretty much`) under the `removeFillerWords` setting.
18 tests passing. Code blocks remain untouched. Install the attached `.vsix` via "Install from VSIX…", or update from the Marketplace once published.
v0.0.4 — Optimize Pilot
First Marketplace release of Optimize Pilot — compress your Copilot Chat prompts to save tokens before they reach the selected model.
Install: `code --install-extension thavionai.optimize-pilot` or search Optimize Pilot in the Extensions view.
Marketplace: https://marketplace.visualstudio.com/items?itemName=thavionai.optimize-pilot
Highlights
- `@optimize` chat participant: optimizes your prompt, shows before/after token counts, then forwards the slimmed prompt to the model you selected.
- ~60 local, deterministic rules (verbose-phrase reductions, filler/politeness removal, first-person framing removal, whitespace) — zero token cost, code blocks preserved.
- Configurable via `promptOptimizer.*` settings.
- Requires VS Code 1.96.0+ and a language-model provider (GitHub Copilot Chat).
The attached `.vsix` can be installed directly via "Install from VSIX…".