chart
無料Use when the user asks to visualize data with charts, graphs, or plots using the `chart` tool (bar, line, scatter, pie, time series, etc.).
日本語の概要は準備中です。原文の説明を表示しています。
Use when writing or reviewing UI code in packages/kilo-jetbrains/ — Swing layout, platform components, UiStyle tokens, theme colors/fonts/borders, Stack/Align layouts, tool windows/dialogs/popups/notifications, settings pages, and the pre-return UI checklist.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Detailed UI reference for packages/kilo-jetbrains/. See packages/kilo-jetbrains/AGENTS.md for the hard restrictions (no Compose/DSL/JCEF) and the reuse-first index; this skill covers the how.
Do not use Kotlin UI DSL v2 (com.intellij.ui.dsl.builder) in this plugin. Use standard Swing with IntelliJ Platform components for all UI layout. The JetBrains modular template and some older sections of the codebase reference the DSL, but Kilo should not introduce it.
Do not use Kotlin Compose or intellij.platform.compose in this plugin. The JetBrains modular template uses Compose for its demo tool window, but Kilo should use standard Swing with IntelliJ Platform components only. Keep all plugin UI in the existing Swing-based stack.
Do not use JCEF (JBCefBrowser) in this plugin. JCEF does not work in JetBrains remote development (split mode): the frontend process runs on the client machine but JCEF requires a display on the host, making it effectively unusable for remote users. Use standard Swing with IntelliJ Platform components for all UI.
| Need | API |
|---|---|
| Any layout, forms, panels | Standard Swing with IntelliJ Platform component replacements |
| Tool windows | SimpleToolWindowPanel + ToolWindow.contentManager |
| Menus and toolbars | Action System |
| Dialogs | Extend DialogWrapper |
UiStyle (frontend/src/main/kotlin/ai/kilocode/client/ui/UiStyle.kt) is the single source of truth for reusable UI constants in this plugin.
Before introducing any new reusable color, spacing value, border, size, font, or helper:
$INTELLIJ_REPO) or public repository for an existing standard API or named key (e.g. JBUI.CurrentTheme.*, UIUtil.*, NamedColorUtil.*, JBColor.namedColor(...), JBFont.*).UiStyle.UiStyle. Do not scatter constants into component-local fields, pass them through constructors, or duplicate them across files.UiStyle contents:
UiStyle.Gap — DPI-aware spacing primitives (xs, sm, md, lg, pad). Use for borders, gaps, and insets anywhere in the plugin.UiStyle.Colors — theme-aware generic colors (bg, fg, weak, editorBackground, errorLabelForeground, warningLabelForeground).UiStyle.Components — small reusable Swing helpers (e.g. transparent()).SessionUiStyle (frontend/src/main/kotlin/ai/kilocode/client/session/ui/style/SessionUiStyle.kt) owns static tokens specific to the chat/session UI:
SessionUiStyle.SessionLayout — transcript list geometry and scroll increments.SessionUiStyle.View — card sizing, card borders, surfaces, hover colors, and nested objects for Prompt, Reasoning, Message, and Tool.SessionUiStyle.RecentSessions — recent sessions list limits.SessionUiStyle.Timeline — activity-indicator colors for the session header timeline.Rules:
UiStyle.SessionUiStyle.UiStyle.Gap.lg() or SessionUiStyle.View.Prompt.EDITOR_LINES.isOpaque = false unless the component default differs or there is a documented rendering reason.*.properties files.Use IntelliJ platform components instead of raw Swing. Inspection Plugin DevKit | Code | Undesirable class usage highlights raw Swing usage where a platform replacement exists.
| Instead of | Use | Package |
|---|---|---|
JLabel | JBLabel | com.intellij.ui.components |
JTextField | JBTextField | com.intellij.ui.components |
JTextArea | JBTextArea | com.intellij.ui.components |
JList | JBList | com.intellij.ui.components |
JScrollPane | JBScrollPane | com.intellij.ui.components |
JTable | JBTable | com.intellij.ui.table |
JTree | Tree | com.intellij.ui.treeStructure |
JSplitPane | JBSplitter | com.intellij.ui |
JTabbedPane | JBTabs | com.intellij.ui.tabs |
JCheckBox | JBCheckBox | com.intellij.ui.components |
| Raw runtime colors | UIUtil, JBUI.CurrentTheme, NamedColorUtil, JBColor.namedColor, JBColor.lazy | com.intellij.util.ui, com.intellij.ui |
EmptyBorder | JBUI.Borders.empty() | com.intellij.util.ui |
| Hardcoded pixel sizes | JBUI.scale(px) | com.intellij.util.ui |
Generic utilities:
| Need | Preferred API |
|---|---|
| Concise border layout | BorderLayoutPanel, JBUI.Panels.simplePanel(...) |
| Platform panel helpers | JBPanel.withBorder(...), .andTransparent(), .andOpaque() |
| Platform label behavior | JBLabel |
| Context help | ContextHelpLabel |
| Links | HyperlinkLabel, LinkLabel |
| High-performance rich fragments | SimpleColoredComponent |
| List renderers | ColoredListCellRenderer |
| Tree renderers | ColoredTreeCellRenderer |
| Renderer text styles | SimpleTextAttributes |
| Editable list toolbar | ToolbarDecorator |
| Platform list | JBList |
| Platform tree | Tree |
| Need | Component |
|---|---|
| Rich HTML with modern CSS, icons, shortcuts | JBHtmlPane (com.intellij.ui.components.JBHtmlPane) |
| Simple multi-line label with HTML | JBLabel + XmlStringUtil.wrapInHtml() |
| Single-line transcript text (tool headers, file links, to-do rows) | PlainLabel (ai.kilocode.client.ui.PlainLabel) with underline/strike; never <html> text, because Swing re-parses every HTML label each time an editor tab is detached or re-attached |
| Scrollable / wrapping HTML panel | SwingHelper.createHtmlViewer() |
| High-performance colored text fragments in trees/lists/tables | SimpleColoredComponent |
| Plain-text newline splitting | MultiLineLabel — legacy, do not use in new code |
HtmlChunk/HtmlBuilder (com.intellij.openapi.util.text.HtmlChunk). Avoid raw HTML string concatenation — it risks injection and breaks localization.XmlStringUtil.wrapInHtml(content), XmlStringUtil.wrapInHtmlLines(lines...), XmlStringUtil.escapeString(text).JBLabel.setCopyable(true). Use setAllowAutoWrapping(true) for auto-wrap.JEditorPane manually, always use HTMLEditorKitBuilder instead of constructing HTMLEditorKit directly.SwingTextTrimmer. Do not manually truncate strings.*.properties files; HTML markup in values is acceptable.Do not hardcode runtime colors. IntelliJ UI colors must come from the current theme, component state, editor color scheme, or a centralized semantic named color key.
Prefer semantic helpers for common UI roles:
| Need | Preferred API |
|---|---|
| Ordinary label text | UIUtil.getLabelForeground() |
| Secondary/help text | UIUtil.getContextHelpForeground() |
| Error label text | UIUtil.getErrorForeground() |
| Warning label text | JBUI.CurrentTheme.Label.warningForeground() |
| Inactive secondary text | NamedColorUtil.getInactiveTextColor() |
| Bounds and standard border color | NamedColorUtil.getBoundsColor() / JBColor.border() |
| Links | JBUI.CurrentTheme.Link.Foreground.ENABLED / HOVERED / PRESSED |
| List renderer text/background | UIUtil.getListForeground(selected, focused) / UIUtil.getListBackground(selected, focused) |
| Tree renderer text/background | UIUtil.getTreeForeground(selected, focused) / UIUtil.getTreeBackground(selected, focused) |
| Popup background | JBUI.CurrentTheme.Popup.BACKGROUND |
| Validation errors | JBUI.CurrentTheme.Validator.errorBorderColor() / errorBackgroundColor() |
| Validation warnings | JBUI.CurrentTheme.Validator.warningBorderColor() / warningBackgroundColor() |
Use JBColor.lazy { ... } for colors that depend on runtime state or the active editor color scheme. Use JBColor.namedColor("Some.Semantic.Key", fallback) when defining or consuming a semantic color key. For HTML/CSS snippets, compute the color from a theme API and convert it with ColorUtil.toHtmlColor(...).
Avoid inline Color(...), numeric JBColor(...), Gray.xNN, JBColor.GRAY, and hex color literals in runtime UI code. The exception is a centralized semantic color definition with a named color key when no existing platform key exists.
Do not hardcode font sizes or font families.
JBFont.h1() through JBFont.h4() for headings..asBold(), .asItalic(), and .asPlain() for style changes on JBFont values.JBFont.regular(), JBFont.medium(), and JBFont.small() for regular and secondary text.RelativeFont when adjusting an existing component font relatively.SimpleTextAttributes.ERROR_ATTRIBUTES, GRAYED_ATTRIBUTES, SHORTCUT_ATTRIBUTES, and LINK_ATTRIBUTES.Avoid Font("..."), raw font sizes, and deriveFont(14f) style calls.
JBUI.Borders.empty(top, left, bottom, right) and insets via JBUI.insets() — DPI-aware and auto-update on zoom.JBUI.scale(int) for any pixel dimension to ensure proper HiDPI scaling.EmptyBorder, raw Insets, or raw Dimension unless there is no platform alternative.updateUI() or subscribing to LafManagerListener.TOPIC.JBValue.UIInteger for themeable arc and spacing values. Call .get() during layout and size calculation; do not cache the resolved Int in a constructor or property initializer.For common spacing lookups, prefer JBUI.CurrentTheme area-specific insets (e.g. JBUI.CurrentTheme.ActionsList.cellPadding(), JBUI.CurrentTheme.Toolbar.toolbarButtonInsets(), JBUI.CurrentTheme.ToolWindow.headerLabelLeftRightInsets()) over inventing numbers.
| Need | Preferred source |
|---|---|
| Manual Swing empty padding | JBUI.Borders.empty(...) |
| Manual Swing insets | JBUI.insets(...), JBUI.emptyInsets(), JBUI.insetsTop(...) |
| Manual Swing dimensions | JBUI.size(...), JBDimension, JBUI.scale(...) |
| Side separators | JBUI.Borders.customLineTop(...), customLineBottom(...) |
| Composed borders | JBUI.Borders.compound(...), JBUI.Borders.merge(...) |
Simple BorderLayout panels | JBUI.Panels.simplePanel(...), BorderLayoutPanel |
| One-dimensional multi-component rows/columns | ai.kilocode.client.ui.layout.Stack — see section below |
| Fluent platform panels | JBPanel.withBorder(...), .andTransparent(), .andOpaque(), .withBackground(...) |
| Single-component alignment wrapper | ai.kilocode.client.ui.layout.Align — see section below |
Use Stack (ai.kilocode.client.ui.layout.Stack) when multiple Swing components should be laid out as one vertical column or one horizontal row without visual chrome. It is a transparent, no-border, no-color JPanel(null) that lays out visible children in insertion order.
Behavior:
| Mode | Layout behavior | Size contribution |
|---|---|---|
Stack.vertical(gap) | Children are placed top-to-bottom; each child fills the available container width; each child keeps its bounded preferred height | Width is max child width; height is summed child heights plus gaps |
Stack.horizontal(gap) | Children are placed left-to-right; each child fills the available container height; each child keeps its bounded preferred width | Width is summed child widths plus gaps; height is max child height |
"Bounded preferred" means the child's preferred size on the stack axis is coerced into the effective [min, max] range. On the cross axis, layout tracks the container size even if that ignores an individual child's preferred/minimum/maximum size.
Factories and fluent additions:
Stack.vertical()
.next(header)
.next(body)
Stack.horizontal(gap = UiStyle.Gap.md())
.next(icon)
.next(label)
Stack.vertical(gap = UiStyle.Gap.sm())
.next(summary)
.gap(UiStyle.Gap.lg())
.next(details)
Stack.vertical()
.next(header)
.fill(UiStyle.Gap.pad())
.next(body)
Stack.horizontal()
.next(icon)
.fill(UiStyle.Gap.sm())
.next(label)
Rules:
Stack.vertical(...) or Stack.horizontal(...) over one-off JPanel + BoxLayout or simple single-line FlowLayout rows/columns.gap for the normal spacing between adjacent visible children.gap(size) for an explicit one-off gap only when the next added child is the next visible child. It is ignored when it is trailing or when a hidden component appears before the next visible child.fill(size), Stack.verticalFiller(size), or Stack.horizontalFiller(size) for persistent leading, trailing, or interstitial whitespace. Do not use Box or gap(size) for persistent spacing.Stack for simple retained Swing rows/columns where children should track the cross-axis size. Use Align for positioning one child inside available space.Stack for padding, borders, colors, wrapping rows, flexible glue, or transcript components that need width-aware HTML reflow. Use JBUI.Borders.empty(...), UiStyle.Gap, purpose-built layouts, or SessionLayout for those concerns.Stack and Align ask each child for its minimum, preferred and maximum size, so measuring a deep invalid tree grows with every nesting level. A tree that is invalidated and measured over and over, such as a list renderer stamp, should run each layout or size read inside LayoutPass.measure { ... }, which answers each size once per container for that pass. Do not change the measured content inside the pass.Use Align (ai.kilocode.client.ui.layout.Align) when a single Swing component must be positioned inside available space without adding visual chrome. It is a transparent, no-border, no-color JPanel(null) that lays out its one child according to independent horizontal (HAlign) and vertical (VAlign) modes. CenterShrinkPanel has been removed; use child.align(HAlign.CENTER, VAlign.CENTER) as a direct replacement.
Alignment modes:
| Mode | Axis | Layout behavior | Wrapper size contribution |
|---|---|---|---|
HAlign.TRACK / VAlign.TRACK | either | Child always fills all available space; ignores child min/preferred/max | Zero (wrapper reports insets only on that axis) |
HAlign.FIT / VAlign.FIT | either | Child fills available space clamped to child's effective [min, max] range | Child min/preferred/max respected |
HAlign.LEFT / VAlign.TOP | H / V | Child placed at left/top edge at bounded preferred size; shrinks to available when necessary | Child min/preferred/max respected |
HAlign.CENTER / VAlign.CENTER | H / V | Child centered at bounded preferred size; shrinks to available when necessary | Child min/preferred/max respected |
HAlign.RIGHT / VAlign.BOTTOM | H / V | Child placed at right/bottom edge at bounded preferred size; shrinks to available when necessary | Child min/preferred/max respected |
"Bounded preferred" means the child's preferred size coerced into the effective [min, max] range. If available space is smaller than the effective minimum, the layout shrinks the child to available space to avoid overflow.
Factory extension on Component:
child.align(HAlign.LEFT, VAlign.TOP) // left-aligned, top-pinned
child.align(HAlign.CENTER, VAlign.CENTER) // centered (replaces CenterShrinkPanel)
child.align(HAlign.TRACK, VAlign.CENTER) // fill width, center vertically
child.align(HAlign.TRACK, VAlign.TRACK) // fill all available space
Rules:
child.align(h, v) over creating one-off JPanel(FlowLayout(...)) or BorderLayoutPanel wrappers just to control alignment.TRACK when the child must occupy all available space on an axis and must not reserve any space in the parent's size negotiation on that axis. Use FIT when you want to fill available space but still respect child min/max constraints.Align for spacing, padding, borders, colors, or multi-child layout — use JBUI.Borders.empty(...), UiStyle.Gap, or an appropriate layout manager for those concerns.com.intellij.toolWindow extension point (already done in kilo.jetbrains.frontend.xml).ToolWindowFactory.createToolWindowContent() — called lazily on first click.SimpleToolWindowPanel(vertical = true) as a convenient base — supports toolbar + content layout.ToolWindow.contentManager: create content with ContentFactory.getInstance().createContent(component, title, isLockable), then contentManager.addContent().ToolWindowFactory.isApplicableAsync(project).ToolWindowManager.invokeLater() instead of Application.invokeLater() for tool-window-related EDT tasks.DialogWrapper. Call init() from the constructor. Override createCenterPanel() to return UI content.getPreferredFocusedComponent() for initial focus, getDimensionServiceKey() for size persistence.showAndGet() (modal, returns boolean) or show() (then use getExitCode()).initValidation() in constructor, override doValidate() — return null if valid or ValidationInfo(message, component) if not.ComponentValidator with withValidator, withFocusValidator, and andRegisterOnDocumentListener instead of custom tooltip/error border logic.<notificationGroup id="Kilo Code" displayType="BALLOON"/>.Notification("Kilo Code", "message", NotificationType.INFORMATION).notify(project)..addAction(NotificationAction.createSimpleExpiring("Label") { ... }).displayType="STICKY_BALLOON" + .setSuggestionType(true).displayType="TOOL_WINDOW" toolWindowId="Kilo Code".Messages.show*() dialogs.JBPopupFactory.getInstance() for lightweight floating UI (no chrome, auto-dismiss on focus loss).createComponentPopupBuilder(component, focusable) for arbitrary Swing content; createPopupChooserBuilder(list) for item selection; createActionGroupPopup() for action menus.showInBestPositionFor(editor), showUnderneathOf(component), or showInCenterOf(component).JBList not JList — adds empty text, busy indicator, tooltip truncation.Tree not JTree — adds wide selection painting, auto-scroll on DnD.ColoredListCellRenderer / ColoredTreeCellRenderer — append() for styled text, setIcon() for icons.ListSpeedSearch(list) / TreeSpeedSearch(tree).ToolbarDecorator.createDecorator(list).setAddAction { }.setRemoveAction { }.createPanel().ListUtil.installAutoSelectOnMouseMove(list) for popup-like hover-selection behavior.ScrollingUtil.installActions(list) for keyboard navigation.CollectionListModel<T> for simple item storage; FilteringListModel<T> for filtering with speed search.The icon-jetbrains skill (.kilo/skills/icon-jetbrains/SKILL.md) is the single source of truth for SVG icon authoring: canvas sizes, palette colors, dark variants, composition rules, placement, and validation. Always load that skill when creating, modifying, or reviewing icon assets. Do not duplicate its guidance here.
This section covers only the Kotlin/runtime integration side:
ai.kilocode.client.ui.HoverIcon so the control gets the standard 24×24 hover treatment. Do not create JButton(icon) or wrap a bare icon in a button just to make it clickable.AllIcons.* constants.resources/icons/. Load via IconLoader.getIcon("/icons/foo.svg", MyClass::class.java).icons package or a *Icons object with @JvmField on each constant.icon-jetbrains skill for the authoritative Icon roles table, canvas sizes, filename patterns, and dark variant conventions. Do not duplicate sizing or palette values here.IntelliJ does not theme SVG icons with currentColor, CSS classes, CSS variables, <style> blocks, or inherited styles. SVGLoader patches icon colors by matching literal hex values in fill and stroke attributes against the active theme palette. Use hardcoded palette hex values in SVG assets and provide dark variants. This exception applies to icon asset files only; runtime Swing UI code must still derive colors from theme APIs.
Themes can override palette colors through icons.ColorPalette in the theme JSON.
Official references:
Review generated UI code and remove:
isOpaque = falsepreferredSize, minimumSize, or maximumSizeDimension, Insets, EmptyBorder, or ColorColor(...), numeric JBColor(...), Gray.xNN, JBColor.GRAY, or hex color literalsColorUtil.toHtmlColor(themeColor) when the source is theme-derived)deriveFont(...) callsJBUI value or UiStyle.Gap constantJBValue.UIInteger(...).get() values in custom layouts — call .get() during layout/sizing insteadupdateUI() overridecurrentColor, CSS variables, CSS classes, <style> blocks, or inherited stylingcom.intellij.ui.dsl.builder) introduced by accidentSettings UI has reusable primitives in frontend/src/main/kotlin/ai/kilocode/client/settings/base/. Check these before adding new settings components or custom Swing assemblies.
BaseSettingsUi for app-backed draft settings that need app-state collection, workspace loading/refreshing, draft/baseline tracking, save progress, save failure handling, and login/banner integration.SettingsPanel and SettingsOverlayPanel as the settings surface so progress and errors go through showProgress, updateProgress, showError, and clearProgress.SettingsTop for settings banners and login prompts rather than ad hoc labels, notifications, or dialog prompts embedded in the form.SettingsDraftState and SettingsDraftPage for modified/reset/apply behavior instead of maintaining unrelated local dirty-state mechanisms.BaseSettingsUi or SettingsListPanel.reload / mutateAndReload) so busy state, refresh selection, and app readiness are handled consistently.showError, SettingsMessageException for user-facing list mutation errors, failedText() / saveError in BaseSettingsUi, and SettingsTop banners for persistent page-level problems.SettingsRow, SettingsStackedRow, and SettingsRows for reusable setting rows, stacked text/editing rows, keyed dynamic rows, and setting sections.Stack, Align, UiStyle, and localized KiloBundle strings according to the UI guidance above.SettingsListPanel, SettingsListView, SettingsListItem, SettingsListCell, SettingsListSelection, and SettingsToolbarAction where applicable.SettingsListCell) for row-local actions like edit/delete and toolbar actions for global add/import/refresh actions.*RpcApiImpl or manager test against MockCliServer that asserts the exact CLI HTTP body and that a subsequent reload observes the persisted value.BasePlatformTestCase coverage for rendered child links, stable child IDs, and inert isModified/apply behavior.まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Use when the user asks to visualize data with charts, graphs, or plots using the `chart` tool (bar, line, scatter, pie, time series, etc.).
日本語の概要は準備中です。原文の説明を表示しています。
Work with Effect v4 / effect-smol TypeScript code in this repo
日本語の概要は準備中です。原文の説明を表示しています。
Use when creating, triaging, or commenting on GitHub issues for the Kilo VS Code extension or JetBrains plugin via `gh`. Covers issue templates, project board assignment, title conventions, and required `gh` scopes.
日本語の概要は準備中です。原文の説明を表示しています。
Create or review IntelliJ New UI SVG icons, theme variants, sizes, and palette.
日本語の概要は準備中です。原文の説明を表示しています。
Create or review icons for Kilo's VS Code extension, webviews, and shared icon registry.
日本語の概要は準備中です。原文の説明を表示しています。
Use when adding or moving code across shared/frontend/backend modules in packages/kilo-jetbrains/ — split-mode RPC contracts, serialization classloader pitfall, threading/EDT annotations, services and coroutine scopes, EDT test rules, dependency bundling, and the CLI server protocol.
日本語の概要は準備中です。原文の説明を表示しています。