Repository navigation
sessions: polish scheduled messages and inline editing - #348455
Closed
Elijah King (eli-w-king) wants to merge 6 commits into
Closed
Elijah King (eli-w-king) wants to merge 6 commits into
Elijah King (eli-w-king) wants to merge 6 commits into
Conversation
Scheduled messages leave the transcript. A clock with their count sits beside the context window usage while the chat has any, and lists them above the input. Editing happens in the chat input in place of the draft, with Cancel and a Save button that names the send time; its dropdown changes the time. The sessions list clock stays visible on hover and shows a card with Edit, Send Now and Cancel Schedule. Send times read day first, without seconds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Screenshot ChangesBase: Changed (5) |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved scheduled-message editing defects can discard time changes, leave editing stuck, and invoke stale actions after attachment updates.
6 open issues
Retained attachments are hidden from the replacement UI · New Saving does not prevent keyboard changes to send time · New Pending edit is not retried when the widget becomes editable · New Navigation failure leaves scheduled message stuck in edit mode · New Cache key ignores scheduled message attachment changes · New Use the base codicon size for the standalone clock · New
What changed in this PR
Moves scheduled-message management from the transcript into the chat composer, while keeping scheduling backed by the existing automation service.
Changes:
- Adds clock controls in the chat input and sessions list for managing scheduled messages.
- Edits scheduled messages in the composer with Save/Cancel controls and draft restoration.
- Standardizes day-first send times and removes obsolete transcript rendering, tests, and fixtures.
| File | Description |
|---|---|
src/vs/workbench/test/browser/componentFixtures/chat/chatWidget.fixture.ts |
Removes scheduled-transcript fixtures. |
src/vs/workbench/contrib/sessions/test/common/scheduledChatTime.test.ts |
Tests day-first time formatting. |
src/vs/workbench/contrib/sessions/test/browser/scheduledChatTimePicker.test.ts |
Updates picker summary expectations. |
src/vs/workbench/contrib/sessions/test/browser/scheduledChatsService.test.ts |
Updates editing and navigation expectations. |
src/vs/workbench/contrib/sessions/common/scheduledChatTime.ts |
Adds shared send-time formatting. |
src/vs/workbench/contrib/sessions/browser/views/sessionsView.ts |
Groups scheduled messages by session. |
src/vs/workbench/contrib/sessions/browser/views/sessionsList.ts |
Connects session clocks to management cards. |
src/vs/workbench/contrib/sessions/browser/views/sessionScheduledRequestsCard.ts |
Renders scheduled-message cards and actions. |
src/vs/workbench/contrib/sessions/browser/scheduledChatTimePicker.ts |
Uses shared send-time formatting. |
src/vs/workbench/contrib/sessions/browser/scheduledChatsService.ts |
Routes editing through the target composer. |
src/vs/workbench/contrib/sessions/browser/media/sessionsList.css |
Styles persistent clocks and management cards. |
src/vs/workbench/contrib/sessions/browser/chat/media/chatInput.css |
Positions the clock beside context usage. |
src/vs/workbench/contrib/chat/test/common/model/chatViewModel.test.ts |
Removes scheduled-transcript model tests. |
src/vs/workbench/contrib/chat/test/browser/widget/input/chatInputPart.test.ts |
Tests draft restoration after scheduled editing. |
src/vs/workbench/contrib/chat/test/browser/widget/chatWidget.test.ts |
Tests composer editing, focus, and saving. |
src/vs/workbench/contrib/chat/test/browser/widget/chatListWidget.test.ts |
Removes obsolete transcript interaction tests. |
src/vs/workbench/contrib/chat/test/browser/widget/chatListRenderer.test.ts |
Removes scheduled-card renderer tests. |
src/vs/workbench/contrib/chat/test/browser/accessibility/chatResponseAccessibleView.test.ts |
Removes scheduled-transcript accessible-view tests. |
src/vs/workbench/contrib/chat/common/model/chatViewModel.ts |
Removes scheduled messages from transcript items. |
src/vs/workbench/contrib/chat/browser/widget/media/chat.css |
Removes scheduled-transcript styles. |
src/vs/workbench/contrib/chat/browser/widget/input/media/chatScheduledRequests.css |
Styles composer scheduling controls. |
src/vs/workbench/contrib/chat/browser/widget/input/chatScheduledRequests.ts |
Adds the clock, list, and editing toolbar. |
src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts |
Hosts scheduled edits while preserving drafts. |
src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts |
Coordinates scheduled-edit lifecycle and submission. |
src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts |
Removes scheduled-transcript list handling. |
src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts |
Removes scheduled cards and inline editors. |
src/vs/workbench/contrib/chat/browser/chatRequestText.ts |
Removes scheduled-transcript accessible-text helper. |
src/vs/workbench/contrib/chat/browser/chat.ts |
Adds widget-level scheduled-message API. |
src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.ts |
Removes scheduled-transcript accessible-view handling. |
src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.ts |
Removes scheduled-transcript labels. |
src/vs/sessions/SESSIONS_LIST.md |
Documents clock-based scheduled-message management. |
src/vs/sessions/contrib/sessions/test/browser/pendingSessionsList.test.ts |
Expects clocks to remain visible on hover. |
src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.ts |
Documents the composer management workflow. |
src/vs/sessions/AUTOMATIONS.md |
Documents composer-based scheduled editing. |
src/vs/platform/actions/common/actions.ts |
Removes the obsolete scheduled-execute menu. |
Review effort: Balanced
Comment on lines
+676
to
+680
| this._applyDraft({ | ||
| inputText: editing.text, | ||
| attachments: editing.input?.attachments ?? [], | ||
| selections: [], | ||
| contrib: { [ChatDynamicVariableModel.ID]: editing.input?.references ?? [] }, |
Comment on lines
+256
to
+270
| const store = this._register(new DisposableStore()); | ||
| onActivate(cancel, store, () => this.editing?.cancel()); | ||
| onActivate(this.saveLabel, store, () => this.run(this.save())); | ||
| // Typing continues in the message once the time is chosen. | ||
| onActivate(this.changeTime, store, () => this.run(Promise.resolve(this.editing?.selectTime.run(this.changeTime)).then(() => this.focusInput()))); | ||
| } | ||
|
|
||
| update(editing: IChatScheduledRequestEditing | undefined): void { | ||
| if (editing !== this.editing) { | ||
| this.editing = editing; | ||
| this.editingStore.clear(); | ||
| if (editing) { | ||
| this.editingStore.add(autorun(reader => this.element.classList.toggle('saving', !!editing.isSaving?.read(reader)))); | ||
| } | ||
| } |
Comment on lines
+293
to
+294
| // Only for the chat the input is showing, so an edit never opens in an input that is moving between chats. | ||
| widget.setScheduledRequests(isEqual(widget.viewModel?.sessionResource, resource) ? requests : []); |
Comment on lines
+782
to
+783
| if (conversation && session && ![...this.chatInputs.keys()].some(widget => widget.visible && isEqual(widget.viewModel?.sessionResource, conversation.chatResource))) { | ||
| void this.sessionsService.openChat(session, conversation.chatResource); |
| } | ||
| card?.store.dispose(); | ||
| const cardStore = new DisposableStore(); | ||
| card = { key, store: cardStore, element: renderScheduledRequestsCard(requests, cardStore, run) }; |
| } | ||
|
|
||
| .chat-scheduled-requests-widget .chat-scheduled-requests-icon { | ||
| font-size: 14px; |
…wn to send
Scheduled messages wait in their chat under Scheduled, alongside steering and queued messages, and say how long
until they send ("Sending in 3 hours") instead of a date and time zone; the exact time shows on hover or focus.
Editing opens the message in the chat input in place of the draft, with Cancel and Save for its time, while the
message says Editing. The session's clock in the sessions list shows a card with each message, how long until it
sends, and Edit, Send Now and Cancel Schedule. Send Later presets no longer show timestamps.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore the native inline editor for scheduled messages, with Cancel and a Save for time split button. Keep the main draft untouched and inherit the conversation's model configuration in the inline editor. Remove the abandoned composer-editing component, draft-swapping logic, widget API, styles and obsolete tests. Preserve the relative-time presentation and sessions-list hover. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use Send Today at <time> and the corresponding day/date wording in the inline scheduled-message button. Keep other time displays and schedule-saving behavior unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep upstream rename behavior and the scheduled-message hover control. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep scheduled prompts in the transcript with relative send times, inline timed Send controls and the sessions-list preview. Remove the superseded composer-clock and draft-swapping implementation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Scheduled prompts show how long until they send, like "Sending in 3 hours", with the exact local time on hover. Editing stays inside the scheduled prompt, with Cancel and a "Send Today at 11:42 AM" split button. The chevron changes the send time, and the main composer's draft stays untouched.
The clock in the sessions list stays visible on hover and opens a card with the scheduled messages, their countdowns, and Edit, Send Now and Cancel Schedule. Edit opens the prompt in its original chat.
How to try it
sessions.sendLater.enabledandchat.automations.enabled.Still open