Skip to content

Commit bbba687

Browse files
committed
Extract update check interval into a shared constant
- place update check interval time in values └── apps └── editor └── src ├── constants │ └── values.ts ├── utils │ └── check-for-updates.ts └── views └── prompt └── backend └── prompt-view-provider.ts
1 parent 7f4493b commit bbba687

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/editor/src/constants/values.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export const MAX_FILE_TOKENS_FOR_COMMIT_MESSAGE = 20000
33
export const MAX_PROMPT_CHARS_IN_COMMIT_MESSAGE = 1000
44
export const GIT_LOG_SINCE_DURATION = '6 months ago'
55
export const SYMBOL_CACHE_DURATION = 5 * 60 * 1000
6+
export const UPDATE_CHECK_INTERVAL = 24 * 60 * 60 * 1000 // 24 hours
67

78
export const DIFF_PLACEHOLDERS = {
89
FILE_CREATED: 'File created',

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import { replace_symbols } from './utils/symbols/replace-symbols'
4242
import { SymbolCacheManager } from './utils/symbols/symbol-cache'
4343
import { AgenticSearchState } from '@/features/agentic-search'
4444
import { t } from '@/i18n'
45+
import { UPDATE_CHECK_INTERVAL } from '@/constants/values'
4546
import {
4647
get_valid_web_configurations,
4748
get_display_path_for_editor,
@@ -216,7 +217,7 @@ export class PromptViewProvider implements vscode.WebviewViewProvider {
216217
() => {
217218
this.check_for_updates()
218219
},
219-
24 * 60 * 60 * 1000
220+
UPDATE_CHECK_INTERVAL
220221
)
221222

222223
this.websocket_server_instance.on_connection_status_change((connected) => {

0 commit comments

Comments
 (0)