Skip to content

Conversation

Copy link

Copilot AI commented Nov 21, 2025

TypeScript compilation was failing due to duplicate code in the model selection dialog filter logic.

Changes:

  • Removed erroneous duplicate object properties (title, description, category, footer) and duplicate filter() call that appeared after the filter predicate closure
  • The duplicate code was causing TS1135, TS1005, TS1109, and TS1128 syntax errors

Before:

filter((x) => {
  // filter logic
  return true
}),
  },                           // <- duplicate closing brace
  title: info.name ?? model,   // <- duplicate properties
  description: provider.name,
  category: provider.name,
  footer: info.cost?.input === 0 && provider.id === "opencode" ? <Free /> : undefined,
})),
filter((x) => Boolean(ref()?.filter) || !local.model.recent().find((y) => isDeepEqual(y, x.value))),  // <- duplicate filter
sortBy((x) => x.title),

After:

filter((x) => {
  // filter logic
  return true
}),
sortBy((x) => x.title),

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


Note

Removes duplicated object fields and an extraneous filter in dialog-model.tsx model options pipeline, fixing TypeScript compilation errors.

  • TUI / Model Dialog (packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx):
    • Cleaned options pipeline by removing duplicated object properties (title, description, category, footer) and an extra filter(...) following the predicate block.
    • Preserves intended filtering/sorting: keeps favorites/recents exclusion and sortBy((x) => x.title).

Written by Cursor Bugbot for commit 8fc66eb. This will update automatically on new commits. Configure here.

Co-authored-by: kcrommett <523952+kcrommett@users.noreply.github.com>
Copilot AI changed the title [WIP] Add model favorites functionality and UI updates Fix syntax errors in dialog-model.tsx from duplicate code block Nov 21, 2025
@shuv1337 shuv1337 marked this pull request as ready for review November 21, 2025 00:31
Copilot AI requested a review from shuv1337 November 21, 2025 00:31
@shuv1337 shuv1337 closed this Nov 21, 2025
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.

2 participants