Skip to content

fix: resolve lint warnings across server and web#4

Merged
bscholar-tt merged 13 commits into
mainfrom
bscholar/lint
May 28, 2026
Merged

fix: resolve lint warnings across server and web#4
bscholar-tt merged 13 commits into
mainfrom
bscholar/lint

Conversation

@bscholar-tt
Copy link
Copy Markdown
Owner

  • Remove unused imports: ProviderApprovalDecision, ProviderSendTurnInput, CreateAgentSessionOptions, ProviderUserInputAnswers (PiAdapter.ts); ProviderInstanceId (serverRuntimeStartup.ts + test); HttpBody (server.test.ts)
  • Rename unused variables to underscore-prefixed: _piEnvironment (PiAdapter.ts), _eventLoggers (PiDriver.ts)
  • Remove unused encodeJsonString declaration (PiTextGeneration.ts)
  • Add composerRef to useCallback/useEffect deps in ChatView.tsx (exhaustive-deps: focusComposer, addTerminalContextToDraft, keyboard shortcut handler, onRespondToActivePendingUserInputChoice, onChangeActivePendingUserInputCustomAnswer, onSubmitPlanFollowUp, onImplementPlanInNewThread)
  • Replace spread-in-map with Object.assign in clientPersistenceStorage.ts (oxc no-map-spread)
  • Extract throwRegistryReadUninitialized to module scope in catalog.test.ts (unicorn consistent-function-scoping)
  • Opt into Node.js 24 for release job to silence action-gh-release deprecation

What Changed

Why

UI Changes

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

bscholar-tt and others added 13 commits May 27, 2026 11:39
- Remove unused imports: ProviderApprovalDecision, ProviderSendTurnInput,
  CreateAgentSessionOptions, ProviderUserInputAnswers (PiAdapter.ts);
  ProviderInstanceId (serverRuntimeStartup.ts + test); HttpBody (server.test.ts)
- Rename unused variables to underscore-prefixed: _piEnvironment (PiAdapter.ts),
  _eventLoggers (PiDriver.ts)
- Remove unused encodeJsonString declaration (PiTextGeneration.ts)
- Add composerRef to useCallback/useEffect deps in ChatView.tsx
  (exhaustive-deps: focusComposer, addTerminalContextToDraft, keyboard
  shortcut handler, onRespondToActivePendingUserInputChoice,
  onChangeActivePendingUserInputCustomAnswer, onSubmitPlanFollowUp,
  onImplementPlanInNewThread)
- Replace spread-in-map with Object.assign in clientPersistenceStorage.ts
  (oxc no-map-spread)
- Extract throwRegistryReadUninitialized to module scope in catalog.test.ts
  (unicorn consistent-function-scoping)
- Opt into Node.js 24 for release job to silence action-gh-release deprecation
Track activeTextItemId/activeReasoningItemId on PiTurnState so text
content is emitted as proper item.started/content.delta/item.completed
sequences rather than bare content.delta events without an itemId.
Boundaries are closed when a tool execution starts or the turn ends,
giving the UI the structure it needs to display text interleaved with
tool calls instead of merging all text together.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove hardcoded BUILT_IN_MODELS from PiProvider. Models are now
discovered at runtime by running `pi --list-models` in the background
enrichSnapshot hook, surfacing every provider/model pair Pi has access
to (anthropic, cursor, openai, etc.) using `provider/model` slugs.

- Add parsePiListModelsOutput() to parse the tabular CLI output
- Add discoverPiModels effect (12s timeout) returning all rows
- Add enrichPiSnapshot (mirrors enrichCursorSnapshot pattern): chains
  version-advisory enrichment then model discovery, publishes updated
  snapshot with discovered + custom models
- checkPiProviderStatus and makePendingPiProvider now start with an
  empty built-in list; enrichment fills in the real list
- Wire enrichPiSnapshot into PiDriver enrichSnapshot hook

Cursor models (and any other provider models) now appear automatically
after login without restarting t3code.
…napshot

Skills discovered from the filesystem are now also exposed as
/skill:<name> slash commands so they appear in the "/" menu alongside
built-in commands. A /compact command is added with direct
piSession.compact() dispatch, and $skill references from the "$" menu
are translated to /skill: format for Pi's native expansion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Version check and skill discovery now run in parallel via
Effect.all and are cached with a 5-minute TTL using the same
Cache.make pattern as ClaudeDriver, eliminating redundant
subprocess spawns and filesystem scans on repeated snapshot
refreshes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The CLI writes its model table to stderr, not stdout. Fixes model
discovery returning zero results.
The adapter was restructured to use RPC commands but the /compact
interception and $skill→/skill: translation were not carried over.
This re-adds both: /compact dispatches a compact RPC command directly,
and $skillname references are rewritten to /skill:skillname for Pi's
native skill expansion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…heck

Spawns a short-lived `pi --mode rpc` process during the capabilities
probe and sends `get_commands` to discover extension commands, skill
commands, and prompt templates that Pi knows about. These are surfaced
as slash commands in the provider snapshot alongside the static
/compact entry. Falls back gracefully if the probe times out or fails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The RPC get_commands response already returns names like "skill:lsf",
so wrapping with another "skill:" produced "skill:skill:lsf".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ations

Skill commands sent via / without instructions cause Pi to hang because
the LLM receives a skill block with no user query. Skills remain
discoverable via the $ menu where users naturally add instructions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The $ menu reads from the skills array which was only populated by
filesystem scanning. RPC-discovered skill commands are now merged into
the skills array so they appear in the $ menu where users can add
instructions alongside the skill invocation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The RPC returns names like "skill:checkin" but the frontend title-cases
the name field, producing "Skill Checkin". Strip the prefix so skills
display as just "Checkin", "Glab", etc.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bscholar-tt bscholar-tt merged commit 16e686f into main May 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant