Skip to content

Commit c62f5a4

Browse files
committed
Reduce instructions token count debounce delay to 500ms
- the token count of the instructions in prompt field appear with an unpleasant delay ├── apps │ └── editor │ └── src │ └── views │ └── prompt │ ├── backend │ │ └── prompt-view-provider.ts │ ├── frontend │ │ ├── Main │ │ │ └── MainView │ │ │ └── MainView.tsx │ │ └── hooks │ │ └── use-prompt │ │ └── use-prompt.ts │ └── types │ └── messages.ts └── packages ├── shared │ └── src │ └── utils │ └── display-token-count.ts └── ui └── src └── components └── editor └── common └── prompts ├── PromptField │ ├── PromptField.tsx │ └── hooks │ └── use-handlers │ ├── handle-input-change.ts │ ├── handle-key-down.ts │ └── use-handlers.ts └── shared └── symbols ├── get-highlighted-text.tsx └── reconstruct-raw-value.ts
1 parent 07f070d commit c62f5a4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎apps/editor/src/views/prompt/backend/prompt-view-provider.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ export class PromptViewProvider implements vscode.WebviewViewProvider {
689689
} else {
690690
this._save_instructions_timeout = setTimeout(() => {
691691
this.send_token_count()
692-
}, 1000)
692+
}, 500)
693693
}
694694
} else if (message.command == 'GET_CONNECTION_STATUS') {
695695
handle_get_connection_status(this)

0 commit comments

Comments
 (0)