Files
Kilo-Org_kilo/packages/kilo-vscode/docs/chat-ui-features/code-block-interactions.md
T
2026-02-10 11:06:11 +01:00

1.1 KiB

Code Block Interactions

Interactive functionality for rendered code blocks (copying, expanding, scroll behavior).

Location

Interactions

  • Copy button with visual feedback (checkmark icon)
  • Expand/collapse for long code blocks (500px threshold)
  • Sticky button positioning during scroll
  • Inertial scroll chaining between code block and container
  • Auto-hide buttons during text selection

Suggested migration

Reimplement? No (UI-only).

  • Keep this behavior in the webview as-is when switching the backend per docs/opencode-core/opencode-migration-plan.md.
  • Ensure the Kilo CLI→Kilo event mapping preserves fenced code blocks in assistant output so the existing code-block renderer continues to activate.
  • Reference: Kilo CLI also implements code-block copy in its own UI markdown renderer (packages/ui/src/components/markdown.tsx), but Kilo does not need to adopt it.