feat: per-message thumbs up/down feedback#9718
Conversation
| messages_undo: keybind("<leader>u", "Undo message"), | ||
| messages_redo: keybind("<leader>r", "Redo message"), | ||
| // kilocode_change start - message feedback | ||
| messages_feedback_up: keybind("<leader>+", "Rate last assistant message helpful"), |
There was a problem hiding this comment.
WARNING: <leader>+ cannot be parsed as a literal plus key
Keybind.parse replaces <leader> with leader+ and then splits the combo on +, so this default becomes leader++ and records an empty key name instead of +. The thumbs-up keybind will not fire in the TUI unless the parser learns how to encode a literal plus key or this default uses a parseable binding.
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Other Observations (not in diff)Issues found in unchanged code that cannot receive inline comments:
Files Reviewed (2 files)
Carried forward unresolved findings from unchanged files:
Reviewed by gpt-5.5-2026-04-23 · 914,993 tokens |
a7cf6ff to
43c41d1
Compare
| state: this.connectionState, | ||
| }) | ||
| this.postMessage({ type: "connectionState", state: this.connectionState }) | ||
| pushTelemetryState((m) => this.postMessage(m)) |
There was a problem hiding this comment.
WARNING: Telemetry opt-out changes do not reach an open webview
pushTelemetryState only runs during webview sync, and there is no vscode.env.onDidChangeTelemetryEnabled subscription. If the user disables telemetry while the sidebar is already open, feedback.telemetryEnabled() remains true, so the buttons stay visible and feedbackSubmitted can still persist a rating until the webview reloads. Wire the telemetry change event to post telemetryState and dispose that listener with the other webview disposables.
43c41d1 to
bf3c31b
Compare
Adds thumbs up/down buttons next to the copy button on every assistant message in the VS Code sidebar, and <leader>+/<leader>- keybinds in the TUI. UI state is in-memory only — ratings reset on reload / session switch. Persistence can be added later without changing the telemetry contract. Events are sent to PostHog via the existing telemetry pipeline. For Kilo Gateway turns the payload includes session and message IDs so feedback can be correlated against gateway logs; for direct providers those IDs are omitted since we cannot correlate them to upstream data.
bf3c31b to
cdacd6f
Compare
Summary
Lets users thumbs-up / thumbs-down any assistant response so we can learn which answers land. Feedback is sent through the existing PostHog telemetry pipeline — no new infrastructure, no PostHog changes required.
messages_feedback_up/messages_feedback_downbound by default to<leader>+/<leader>-, operating on the last assistant message.vscode.env.isTelemetryEnabledis false. TUI shows a brief toast and is a no-op whenTelemetry.isEnabled()is false.Payload
Deliberately different by provider — we only collect correlatable IDs when they help improve the product.
providerID,modelID,variant?,rating,previousRating?. No session or message IDs.providerID.startsWith("kilo")): same fields plussessionID,messageID,parentMessageID(= thex-kilo-requestheader value).Event name:
Feedback Submitted. Added once to each enum (TelemetryEventin kilo-telemetry,TelemetryEventNamein kilo-vscode).State
In-memory only. Ratings reset on webview reload and TUI session switch. Persistence was intentionally descoped to keep the first pass simple — it can be added later without changing the telemetry contract or payload shape.
Tests
Unit tests cover payload shaping for both provider variants. End-to-end verified against a local
bun dev servebackend — both payloads accepted with HTTP 200.Related