Skip to content

Commit 25d81bc

Browse files
committed
Rename handle-send-prompt to handle-send-to-browser and update all related references
1 parent c04eb6a commit 25d81bc

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

apps/editor/src/views/panel/backend/message-handlers/handle-send-prompt.ts renamed to apps/editor/src/views/panel/backend/message-handlers/handle-send-to-browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
EDIT_FORMAT_INSTRUCTIONS_DIFF
3030
} from '@/constants/edit-format-instructions'
3131

32-
export const handle_send_prompt = async (params: {
32+
export const handle_send_to_browser = async (params: {
3333
panel_provider: PanelProvider
3434
preset_name?: string
3535
group_name?: string

‎apps/editor/src/views/panel/backend/message-handlers/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export * from './handle-save-edit-format'
1515
export * from './handle-save-history'
1616
export * from './handle-save-instructions'
1717
export * from './handle-replace-presets'
18-
export * from './handle-send-prompt'
18+
export * from './handle-send-to-browser'
1919
export * from './handle-show-history-quick-pick'
2020
export * from './handle-show-prompt-template-quick-pick'
2121
export * from './handle-update-preset'

‎apps/editor/src/views/panel/backend/panel-provider.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
} from '@/commands/checkpoints-command/actions'
1818
import {
1919
handle_copy_prompt,
20-
handle_send_prompt,
20+
handle_send_to_browser,
2121
handle_update_preset,
2222
handle_delete_preset_group_or_separator,
2323
handle_create_checkpoint,
@@ -586,8 +586,8 @@ export class PanelProvider implements vscode.WebviewViewProvider {
586586
handle_get_connection_status(this)
587587
} else if (message.command == 'GET_PRESETS') {
588588
this.send_presets_to_webview(webview_view.webview)
589-
} else if (message.command == 'SEND_PROMPT') {
590-
await handle_send_prompt({
589+
} else if (message.command == 'SEND_TO_BROWSER') {
590+
await handle_send_to_browser({
591591
panel_provider: this,
592592
preset_name: message.preset_name,
593593
group_name: message.group_name,

‎apps/editor/src/views/panel/frontend/Main/Main.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ export const Main: React.FC<Props> = (props) => {
345345
invocation_count: number
346346
}) => {
347347
post_message(props.vscode, {
348-
command: 'SEND_PROMPT',
348+
command: 'SEND_TO_BROWSER',
349349
preset_name: params.preset_name,
350350
group_name: params.group_name,
351351
show_quick_pick: params.show_quick_pick,

‎apps/editor/src/views/panel/types/messages.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ export interface ReplacePresetsMessage extends BaseMessage {
9494
presets: Preset[]
9595
}
9696

97-
export interface SendPromptMessage extends BaseMessage {
98-
command: 'SEND_PROMPT'
97+
export interface SendToBrowserMessage extends BaseMessage {
98+
command: 'SEND_TO_BROWSER'
99+
invocation_count: number
99100
preset_name?: string
100101
group_name?: string
101102
show_quick_pick?: boolean
102-
invocation_count: number
103103
}
104104

105105
export interface CopyPromptMessage extends BaseMessage {
@@ -502,7 +502,7 @@ export type FrontendMessage =
502502
| GetConnectionStatusMessage
503503
| GetPresetsMessage
504504
| ReplacePresetsMessage
505-
| SendPromptMessage
505+
| SendToBrowserMessage
506506
| CopyPromptMessage
507507
| RequestEditorStateMessage
508508
| RequestEditorSelectionStateMessage

0 commit comments

Comments
 (0)