-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(vscode): jump transcript to message on timeline bar click #12025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "kilo-code": minor | ||
| --- | ||
|
|
||
| Click or press Enter on a bar in the task timeline to jump the transcript to that message. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -157,6 +157,29 @@ export const MessageList: Component<MessageListProps> = (props) => { | |
| const lookup = createMemo(() => new Map(partition().direct.map((row) => [row.key, row]))) | ||
| const keys = createMemo(() => partition().virtual.map((row) => row.key)) | ||
| const fingerprint = createMemo(() => rowFingerprint(keys())) | ||
|
|
||
| // Clicking a bar in the task timeline scrolls the transcript to that message. | ||
| // Jumps land instantly (no smooth animation): while pinned at the bottom, a | ||
| // smooth scroll's initial frames sit within createAutoScroll's near-bottom | ||
| // threshold, which resumes auto-follow mid-animation and snaps back down. | ||
| const onScrollToMessage = (e: Event) => { | ||
| const id = (e as CustomEvent<{ id: string }>).detail?.id | ||
| if (!id) return | ||
| const row = rows().find((r) => r.type === "assistant" && r.message.id === id) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WARNING: Jump target loses granularity for long assistant messages
Reply with |
||
| if (!row) return | ||
| autoScroll.pause() | ||
| const index = keys().indexOf(row.key) | ||
| if (index >= 0) { | ||
| virtualizer()?.scrollToIndex(index, { align: "start" }) | ||
| return | ||
| } | ||
| const el = scrollEl() | ||
| const target = el?.querySelector<HTMLElement>(`[data-row-key="${CSS.escape(row.key)}"]`) | ||
| target?.scrollIntoView({ block: "start" }) | ||
| } | ||
| window.addEventListener("scrollToMessage", onScrollToMessage) | ||
| onCleanup(() => window.removeEventListener("scrollToMessage", onScrollToMessage)) | ||
|
|
||
| const measurement = createMemo(() => { | ||
| const id = session.currentSessionID() | ||
| const token = layout() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SUGGESTION: Changeset text omits the Space key
onKeyDowninTaskTimeline.tsxtriggers the jump on bothEnterandSpace(e.key === " "), but this user-facing changeset only mentions Enter.Reply with
@kilocode-bot fix itto have Kilo Code address this issue.