refactor: strip plugin to minimum needed #12 - #13
Merged
Conversation
- Use createEffect + createMemo on session messages instead of setInterval - 10s MIN_REFRESH_INTERVAL_MS throttle to avoid API spam - Pass session_id from sidebar slot props to DeepseekView - Removes onCleanup (no timer to clean)
- Server → dist/four-opencode-deepseek-meter.js - TUI → dist/four-opencode-deepseek-meter-tui.jsx - Single step: bun run build
…12 Replaced hardcoded hex constants (GREEN/ORANGE/RED) with theme().success, theme().warning, theme().error - matching the RGBA type expected by fg prop. Also removed the old getPalette() compat layer that was silently converting RGBA to fallback strings.
…nsive guards #12 package.json: - sidebar: change from string "true" back to boolean true - add back enabled: true to both server and tui configs - restore "." root export - tighten peerDeps to >=1.16.2/0.3.2/1.9.13 (matching last working versions) tui.tsx: - add ?. guards on api.state and api.state.session - prevents TypeError if state/session API surface is missing
- Build: tsc (jsx:preserve) for TUI + Bun.build for server - TUI: theme.warning color when balance < 3.00 - package.json: proper .d.ts types, simplified exports - Remove config blocks, move deps back to dependencies
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.
Closes #12
Summary
Strips the deepseek-meter plugin to its absolute minimum needed functionality:
Removed
@opentui/coredependencyYELLOWconstant (never referenced)is_availablefield from BalanceResponse (never read)BalanceInfointerface (inlined into BalanceResponse)grantedbalance display line (non-essential)createMemoandShowimports (no longer needed)isDeepSeek()(now only checks provider id + baseURL)DEEPSEEK_API_KEYenv var reference (plugin reads from opencode provider state)Result