.kilo/plans/1782926865817-jetbrains-model-picker-details-plan.md
Add a JetBrains model picker maximize/minimize affordance that expands the popup to roughly double width and shows model details comparable to VS Code's ModelPreview. Persist the last expanded/collapsed state in IntelliJ PropertiesComponent. First-time default is collapsed.
PropertiesComponent, not backend/session state.packages/kilo-jetbrains/shared/src/main/kotlin/ai/kilocode/rpc/dto/ProviderDto.ktpackages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/workspace/KiloWorkspaceState.ktpackages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/cli/KiloCliDataParser.ktpackages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/rpc/KiloWorkspaceDtoMapper.ktpackages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/model/SessionModel.ktpackages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/SessionUi.ktpackages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/models/ModelsSettingsUi.ktpackages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/model/ModelPicker*.ktpackages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle*.propertiespackages/kilo-jetbrains/frontend/src/test/... and backend/src/test/...Extend model metadata DTOs.
ProviderDto.kt for preview metadata matching VS Code provider types where practical: cost/cache cost, capabilities/input modalities, options/description, auto-routing model ids, terminal-bench score/cost.ModelDto with nullable fields such as inputPrice, outputPrice, contextLength, releaseDate, latest, cost, capabilities, options, autoRouting, and terminalBench.limit, variants, free, byok, mayTrainOnYourPrompts) to avoid breaking callers.Parse and map the extra metadata in the JetBrains backend.
ModelInfo in KiloWorkspaceState.kt with matching nullable metadata fields.KiloCliDataParser.parseModel and parseModelDto to read the fields currently used by VS Code: inputPrice, outputPrice, contextLength, releaseDate, latest, cost, capabilities.input, options.description, autoRouting.models, and terminalBench.null or empty data, not provider load failure.KiloWorkspaceDtoMapper.model to copy all new fields to ModelDto.Carry metadata through the frontend session/settings model flow.
ModelItem and picker ModelPicker.Item to hold the preview metadata.SessionController -> SessionModel, SessionUi, and ModelsSettingsUi.items() mappings so metadata survives into the picker.limit through to ModelPicker.Item; it is already available in ModelItem but currently dropped in SessionUi.Add a retained Swing details panel.
ModelDetailsPanel near session/ui/model/ or inside ModelPicker.kt if compact enough.JBLabel, SimpleColoredComponent, JBHtmlPane or safe HTML helpers, Stack, and JBUI spacing.HtmlChunk/HtmlBuilder or platform escaping helpers; do not concatenate unescaped HTML.Rework popup layout and size behavior.
ModelPicker.showPopup().Maximize model details and Minimize model details or equivalent.kilo.model.picker.expanded using PropertiesComponent.getInstance().getBoolean(key, false) and setValue(key, value.toString()).setLocateWithinScreenBounds(true).JBPopup resizable only if the implementation can keep the retained layout stable; otherwise keep non-resizable and compute deterministic sizes.Match VS Code interaction semantics where useful.
Add localization strings.
KiloBundle.properties entries for maximize/minimize tooltips, detail labels, pricing labels, context, capabilities, terminal-bench, description, auto-routing choices, and unavailable values.Add tests.
ModelPickerTest: verify expanded property default is collapsed, toggle persists true/false, tooltip/icon state switches maximize/minimize, expanded width is greater than collapsed width, preview panel displays selected/hovered model metadata, and pointer cursor is set on the expand control.BasePlatformTestCase patterns.ModelPicker.Item, ModelItem, or ModelDto as needed using default values to keep changes minimal.JBPopup; changing size after showing may require recreating/repacking carefully. Prefer computing expanded/collapsed preferred size before show and updating the content with revalidate()/repaint() on toggle.packages/kilo-jetbrains/: run ./gradlew typecheck or bun run typecheck.packages/kilo-jetbrains/: run targeted tests for backend parser/serialization and frontend model picker tests, or ./gradlew test if targeted Gradle filters are not straightforward../gradlew runIde, open model picker, confirm first open is collapsed, maximize doubles width and shows details, minimize returns to compact width, tooltip/cursor are correct, and the last state persists after closing/reopening the popup.