Skip to content

Commit 78fa872

Browse files
committed
Standardize chat input tooltips using a dedicated component and remove trailing periods from dictionary messages for consistency
1 parent 7c5e8b5 commit 78fa872

4 files changed

Lines changed: 165 additions & 117 deletions

File tree

‎packages/shared/src/constants/dictionary.ts‎

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -10,116 +10,116 @@ export const dictionary = {
1010
'No "Intelligent Update" configurations found. Please add one in the settings.',
1111
NO_SAFE_FILE_PATHS_REMAINING:
1212
'No safe file paths remaining. Operation cancelled.',
13-
NO_ACTIVE_EDITOR_FOUND: 'No active editor found.',
14-
CLIPBOARD_IS_EMPTY: 'Clipboard is empty.',
13+
NO_ACTIVE_EDITOR_FOUND: 'No active editor found',
14+
CLIPBOARD_IS_EMPTY: 'Clipboard is empty',
1515
CLIPBOARD_CONTENT_APPLIED_SUCCESSFULLY:
16-
'Clipboard content applied successfully.',
16+
'Clipboard content applied successfully',
1717
NO_SAVED_CONTEXTS_IN_WORKSPACE_STATE:
18-
'No saved contexts remaining in the Workspace State.',
18+
'No saved contexts remaining in the Workspace State',
1919
NO_SAVED_CONTEXTS_IN_JSON_FILE:
20-
'No saved contexts remaining in the JSON file.',
21-
NO_FILE_PATHS_FOUND_IN_CLIPBOARD: 'No file paths found in the clipboard.',
20+
'No saved contexts remaining in the JSON file',
21+
NO_FILE_PATHS_FOUND_IN_CLIPBOARD: 'No file paths found in the clipboard',
2222
NO_MATCHING_FILES_FOUND_FOR_CLIPBOARD_PATHS:
23-
'No matching files found in workspace for the paths in clipboard.',
23+
'No matching files found in workspace for the paths in clipboard',
2424
NO_CODE_COMPLETIONS_CONFIGURATIONS_FOUND:
2525
'No "Code Completions" configurations found. Please add one in the settings.',
2626
NO_RECENT_CHANGES_TO_UNDO:
27-
'No recent changes found to undo or changes were already undone.',
28-
CONTEXT_COPIED_TO_CLIPBOARD: 'Context copied to clipboard.',
27+
'No recent changes found to undo or changes were already undone',
28+
CONTEXT_COPIED_TO_CLIPBOARD: 'Context copied to clipboard',
2929
CONTEXT_FROM_OPEN_EDITORS_COPIED_TO_CLIPBOARD:
30-
'Context from open editors copied to clipboard.',
31-
NO_SAVED_CONTEXTS_FOUND: 'No saved contexts found.',
30+
'Context from open editors copied to clipboard',
31+
NO_SAVED_CONTEXTS_FOUND: 'No saved contexts found',
3232
NO_COMMIT_MESSAGES_CONFIGURATIONS_FOUND:
3333
'No "Commit Messages" configurations found. Please add one in the settings.',
3434
NO_FILES_SELECTED_FOR_COMMIT_MESSAGE_GENERATION:
35-
'No files selected for commit message generation.',
36-
COMMIT_MESSAGE_GENERATION_CANCELLED: 'Commit message generation cancelled.',
37-
NO_CHANGES_TO_COMMIT: 'No changes to commit.',
35+
'No files selected for commit message generation',
36+
COMMIT_MESSAGE_GENERATION_CANCELLED: 'Commit message generation cancelled',
37+
NO_CHANGES_TO_COMMIT: 'No changes to commit',
3838
NO_DEFAULT_INTELLIGENT_UPDATE_CONFIGURATION:
3939
'No default "Intelligent Update" configuration found. Please set one as default in the settings.',
4040
NO_EDIT_CONTEXT_CONFIGURATIONS_FOUND:
4141
'No "Edit Context" configurations found. Please add one in the settings.',
4242
PRESET_PREVIEW_SENT_TO_BROWSER:
43-
'Preset preview sent to the connected browser.'
43+
'Preset preview sent to the connected browser'
4444
},
4545

4646
warning_message: {
4747
PREVIEW_ONGOING: 'A new response has been received, switch now?',
4848
SKIPPING_INVALID_PATH: (file_path: string) =>
4949
`Skipping applying change to invalid path: ${file_path}`,
5050
CODE_COMPLETIONS_NO_SELECTION:
51-
'Code completions are not supported with active text selection.',
51+
'Code completions are not supported with active text selection',
5252
CANNOT_REFERENCE_FILE_OUTSIDE_WORKSPACE:
53-
'Cannot reference file outside of the workspace.',
53+
'Cannot reference file outside of the workspace',
5454
WORKSPACE_PROVIDER_NOT_AVAILABLE_CANNOT_SAVE_CONTEXT:
5555
'Workspace provider is not available. Cannot save context.',
5656
NO_WORKSPACE_FOLDER_FOUND_CANNOT_SAVE_CONTEXT:
5757
'No workspace folder found. Cannot save context.',
58-
NOTHING_IN_CONTEXT_TO_SAVE: 'There is nothing in your context to save.',
58+
NOTHING_IN_CONTEXT_TO_SAVE: 'There is nothing in your context to save',
5959
CONTEXTS_FILE_NOT_VALID_ARRAY:
6060
'Contexts file is not a valid array. Starting with empty contexts list.',
61-
NO_FILES_OR_WEBSITES_SELECTED: 'No files or websites selected or open.',
62-
NOTHING_SELECTED_IN_CONTEXT: 'Nothing is selected in context.',
63-
NO_OPEN_EDITORS_SELECTED: 'No open editors selected.',
64-
NO_EDITOR_OPEN: 'No editor is open.',
61+
NO_FILES_OR_WEBSITES_SELECTED: 'No files or websites selected or open',
62+
NOTHING_SELECTED_IN_CONTEXT: 'Nothing is selected in context',
63+
NO_OPEN_EDITORS_SELECTED: 'No open editors selected',
64+
NO_EDITOR_OPEN: 'No editor is open',
6565
CANNOT_COPY_PROMPT_IN_CODE_COMPLETION_WITH_SELECTION:
66-
'Cannot copy prompt in code completion mode with an active selection.',
66+
'Cannot copy prompt in code completion mode with an active selection',
6767
CANNOT_COPY_PROMPT_IN_EDIT_CONTEXT_WITHOUT_CONTEXT:
6868
'Cannot copy prompt in edit context mode without any context. Please add files to the context.',
6969
CANNOT_COPY_PROMPT_IN_CODE_COMPLETION_WITHOUT_EDITOR:
70-
'Cannot copy prompt in code completion mode without an active editor.',
71-
CONTEXT_CANNOT_BE_EMPTY: 'Context cannot be empty.',
72-
INSTRUCTIONS_CANNOT_BE_EMPTY: 'Instructions cannot be empty.',
70+
'Cannot copy prompt in code completion mode without an active editor',
71+
CONTEXT_CANNOT_BE_EMPTY: 'Context cannot be empty',
72+
INSTRUCTIONS_CANNOT_BE_EMPTY: 'Instructions cannot be empty',
7373
CANNOT_PREVIEW_IN_CODE_COMPLETION_WITHOUT_EDITOR:
74-
'Cannot preview in code completion mode without an active editor.',
74+
'Cannot preview in code completion mode without an active editor',
7575
BROWSER_EXTENSION_NOT_CONNECTED:
7676
'Browser extension is not connected. Please install or reload it.',
77-
TYPE_SOMETHING_TO_USE_PRESET: 'Type something to use this preset.',
77+
TYPE_SOMETHING_TO_USE_PRESET: 'Type something to use this preset',
7878
PRESETS_NOT_RUN_DUE_TO_MISSING_INSTRUCTIONS:
79-
'Some presets were not run due to missing instructions.',
80-
TYPE_SOMETHING_TO_USE_GROUP: 'Type something to use this group.',
79+
'Some presets were not run due to missing instructions',
80+
TYPE_SOMETHING_TO_USE_GROUP: 'Type something to use this group',
8181
GROUP_HAS_NO_SELECTED_PRESETS:
82-
'The chosen group has no selected presets to run.',
82+
'The chosen group has no selected presets to run',
8383
URL_OVERRIDE_DIFFERENT_DOMAIN: (preset_name: string) =>
84-
`URL override for preset "${preset_name}" was discarded because it uses a different domain.`,
84+
`URL override for preset "${preset_name}" was discarded because it uses a different domain`,
8585
CONTEXT_SIZE_WARNING: (threshold: string, percentage: number) =>
8686
`Context exceeds threshold of ${threshold} tokens by ${percentage}%. Excessive context size affects accuracy and cost-efficiency.`,
8787
FAILED_TO_CREATE_FILE: (file_path: string) =>
8888
`Failed to create file: ${file_path}`,
8989
FAILED_TO_APPLY_CHANGES_TO_FILE: (file_path: string) =>
9090
`Failed to apply changes to file: ${file_path}`,
9191
COULD_NOT_DELETE_FILE: (file_path: string) =>
92-
`Could not delete file: ${file_path}.`,
92+
`Could not delete file: ${file_path}`,
9393
COULD_NOT_RECREATE_FILE: (file_path: string) =>
94-
`Could not recreate file: ${file_path}.`,
94+
`Could not recreate file: ${file_path}`,
9595
COULD_NOT_UNDO_FILE_MAYBE_CLOSED: (file_path: string) =>
9696
`Could not undo file: ${file_path}. It might have been closed or deleted.`,
9797
NO_VALID_PATHS_IN_CONTEXT: (context_name: string) =>
98-
`No valid paths found in context "${context_name}".`,
98+
`No valid paths found in context "${context_name}"`,
9999
CONFIRM_DELETE_CONTEXT: (context_name: string) =>
100100
`Are you sure you want to delete context "${context_name}"?`,
101101
CONFIRM_DELETE_ITEM: (item_type: 'file' | 'folder') =>
102102
`Are you sure you want to delete this ${item_type}?`,
103103
SAVED_CONTEXT_NOT_FOUND: (name: string, source: string) =>
104-
`Saved context "${name}" from ${source} not found.`,
104+
`Saved context "${name}" from ${source} not found`,
105105
CONFIRM_DELETE_CONFIGURATION: (model: string, provider: string) =>
106106
`Are you sure you want to delete the configuration for model "${model}" provided by ${provider}?`,
107107
CONFIRM_DELETE_MODEL_PROVIDER: (provider_name: string) =>
108108
`Are you sure you want to delete the model provider "${provider_name}"?`,
109109
NO_MODELS_FOUND_MANUAL_ENTRY: (provider_name: string) =>
110110
`No models found for ${provider_name}. You can enter model name manually.`,
111111
NO_RESULTS_FOR_SEARCH_SHOWING_ALL: (search_value: string) =>
112-
`No results for "${search_value}" in the selected context.`,
112+
`No results for "${search_value}" in the selected context`,
113113
NO_MODEL_PROVIDERS_CONFIGURED:
114114
'No model providers configured. Please add a model provider first on the "Model Providers" page.'
115115
},
116116

117117
error_message: {
118118
API_PROVIDER_FOR_CONFIG_NOT_FOUND:
119-
'API provider for the selected API tool configuration was not found.',
119+
'API provider for the selected API tool configuration was not found',
120120
FILE_NOT_FOUND: (file_path: string) => `File not found: ${file_path}`,
121121
INVALID_POSITION_FOR_CODE_COMPLETION: (file_path: string) =>
122-
`Invalid position for code completion in ${file_path}.`,
122+
`Invalid position for code completion in ${file_path}`,
123123
ERROR_DURING_INTELLIGENT_UPDATE_FIX_ATTEMPT:
124124
'Error during fix attempt with the intelligent update tool. Would you like to undo the successfully applied patches?',
125125
UNSAFE_FILE_PATHS_SKIPPED: (count: number, list: string) =>
@@ -140,22 +140,22 @@ export const dictionary = {
140140
`Invalid file path: ${file_path}. Path may contain traversal attempts.`,
141141
FAILED_TO_UNDO_CHANGES: (message: string) =>
142142
`Failed to undo changes: ${message}`,
143-
FAILED_TO_APPLY_CLIPBOARD_CONTENT: 'Failed to apply clipboard content.',
143+
FAILED_TO_APPLY_CLIPBOARD_CONTENT: 'Failed to apply clipboard content',
144144
ERROR_READING_CONTEXTS_FILE: (message: string) =>
145145
`Error reading contexts file: ${message}`,
146146
ERROR_UPDATING_CONTEXT_NAME_IN_FILE: (message: string) =>
147147
`Error updating context name in file: ${message}`,
148148
ERROR_DELETING_CONTEXT_FROM_FILE: (message: string) =>
149149
`Error deleting context from file: ${message}`,
150150
COULD_NOT_FIND_SELECTED_CONTEXT: (label: string) =>
151-
`Could not find the selected context "${label}" after potential edits.`,
151+
`Could not find the selected context "${label}" after potential edits`,
152152
ERROR_SELECTING_SAVED_CONTEXT: (message: string) =>
153153
`Error selecting saved context: ${message}`,
154154
FAILED_TO_SELECT_FILES_FROM_CLIPBOARD: (message: string) =>
155155
`Failed to select files from clipboard: ${message}`,
156156
BUILT_IN_PROVIDER_NOT_FOUND: (name: string) =>
157-
`Built-in provider "${name}" not found.`,
158-
FAILED_TO_COMMIT_CHANGES: 'Failed to commit changes.',
157+
`Built-in provider "${name}" not found`,
158+
FAILED_TO_COMMIT_CHANGES: 'Failed to commit changes',
159159
ERROR_COMMITTING_CHANGES:
160160
'Error committing changes. See console for details.',
161161
FAILED_TO_DELETE: (message: string) => `Failed to delete: ${message}`,
@@ -164,23 +164,23 @@ export const dictionary = {
164164
COULD_NOT_DETERMINE_LOCATION_TO_CREATE_FILE:
165165
'Could not determine location to create file',
166166
INVALID_FILE_NAME: (name: string) => `Invalid file name: '${name}'`,
167-
FILE_ALREADY_EXISTS: (name: string) => `File '${name}' already exists.`,
167+
FILE_ALREADY_EXISTS: (name: string) => `File '${name}' already exists`,
168168
FAILED_TO_CREATE_FILE: (message: string) =>
169169
`Failed to create file: ${message}`,
170170
COULD_NOT_DETERMINE_LOCATION_TO_CREATE_FOLDER:
171171
'Could not determine location to create folder',
172172
INVALID_FOLDER_NAME: (name: string) => `Invalid folder name: '${name}'`,
173-
FOLDER_ALREADY_EXISTS: (name: string) => `Folder '${name}' already exists.`,
173+
FOLDER_ALREADY_EXISTS: (name: string) => `Folder '${name}' already exists`,
174174
FAILED_TO_CREATE_FOLDER: (message: string) =>
175175
`Failed to create folder: ${message}`,
176-
FAILED_TO_OPEN_URL: 'Failed to open url in a web browser.',
176+
FAILED_TO_OPEN_URL: 'Failed to open url in a web browser',
177177
INVALID_NAME: (name: string) => `Invalid name: '${name}'`,
178178
FILE_OR_FOLDER_ALREADY_EXISTS: (name: string) =>
179-
`A file or folder named '${name}' already exists.`,
179+
`A file or folder named '${name}' already exists`,
180180
FAILED_TO_RENAME: (message: string) => `Failed to rename: ${message}`,
181181
ERROR_SAVING_CONTEXT_TO_FILE: (message: string) =>
182182
`Error saving context to file: ${message}`,
183-
CONTEXT_NAME_NOT_PROVIDED: 'Context name was not provided.',
183+
CONTEXT_NAME_NOT_PROVIDED: 'Context name was not provided',
184184
ERROR_SAVING_CONTEXT_TO_WORKSPACE_STATE: (message: string) =>
185185
`Error saving context to Workspace State: ${message}`,
186186
ERROR_COLLECTING_FILES_AND_WEBSITES: (message: string) =>
@@ -198,11 +198,11 @@ export const dictionary = {
198198
'Failed to get Git branches. Make sure you are in a Git repository.',
199199
API_KEY_MISSING_FOR_PROVIDER:
200200
'API key is missing for the selected provider. Please add it in the Settings tab.',
201-
FAILED_TO_GENERATE_COMMIT_MESSAGE: 'Failed to generate commit message.',
202-
GIT_EXTENSION_NOT_FOUND: 'Git extension not found.',
203-
NO_GIT_REPOSITORY_FOUND: 'No Git repository found.',
204-
REPOSITORY_NOT_FOUND: 'Repository not found.',
205-
RESPONSE_TEXT_MISSING: 'Response text to apply is missing.',
201+
FAILED_TO_GENERATE_COMMIT_MESSAGE: 'Failed to generate commit message',
202+
GIT_EXTENSION_NOT_FOUND: 'Git extension not found',
203+
NO_GIT_REPOSITORY_FOUND: 'No Git repository found',
204+
REPOSITORY_NOT_FOUND: 'Repository not found',
205+
RESPONSE_TEXT_MISSING: 'Response text to apply is missing',
206206
APPLYING_CHANGES_FAILED_EMPTY_RESPONSE: (file_path: string) =>
207207
`Applying changes to ${file_path} failed. Empty response from API.`,
208208
ERROR_DURING_REFACTORING: (file_path: string) =>
@@ -226,7 +226,7 @@ export const dictionary = {
226226
COULD_NOT_OPEN_FILE: (file_path: string) =>
227227
`Could not open file: ${file_path}`,
228228
API_PROVIDER_FOR_DEFAULT_CONFIG_NOT_FOUND:
229-
'API provider for the default API tool configuration was not found.',
229+
'API provider for the default API tool configuration was not found',
230230
INTELLIGENT_UPDATE_CONTEXT_NOT_FOUND:
231231
'Could not find the context for intelligent update. Please apply the changes again.',
232232
ORIGINAL_STATE_FOR_FILE_NOT_FOUND: (file_name: string) =>
@@ -238,41 +238,41 @@ export const dictionary = {
238238
FAILED_TO_FETCH_OPEN_ROUTER_MODELS:
239239
'Failed to fetch Open Router models. Please check your connection.',
240240
COULD_NOT_UPDATE_ITEM_NOT_FOUND: (item_type: string, name: string) =>
241-
`Could not update ${item_type}: Original ${item_type} "${name}" not found.`,
241+
`Could not update ${item_type}: Original ${item_type} "${name}" not found`,
242242
ERROR_HANDLING_MESSAGE: (message: string) =>
243243
`Error handling message: ${message}`,
244244
ERROR_CALCULATING_TOKEN_COUNT: (message: string) =>
245245
`Error calculating token count: ${message}`,
246246
FAILED_TO_FETCH_MODELS: (message: string) =>
247247
`Failed to fetch models: ${message}`,
248-
PROVIDER_NOT_FOUND: (name: string) => `Provider ${name} not found.`,
248+
PROVIDER_NOT_FOUND: (name: string) => `Provider ${name} not found`,
249249
BASE_URL_NOT_FOUND_FOR_PROVIDER: (name: string) =>
250-
`Base URL not found for provider ${name}.`,
250+
`Base URL not found for provider ${name}`,
251251
PROVIDER_NOT_FOUND_BY_NAME: (name: string) =>
252-
`Provider "${name}" not found.`,
252+
`Provider "${name}" not found`,
253253
MODEL_PROVIDER_NOT_FOUND_BY_NAME: (name: string) =>
254-
`Model provider "${name}" not found.`,
254+
`Model provider "${name}" not found`,
255255
API_PROVIDER_NOT_FOUND:
256-
'API provider for the selected API tool configuration was not found.',
257-
NO_WORKSPACE_FOLDER_OPEN: 'No workspace folder open.',
256+
'API provider for the selected API tool configuration was not found',
257+
NO_WORKSPACE_FOLDER_OPEN: 'No workspace folder open',
258258
CANNOT_PROCESS_MULTIPLE_FILES_WITHOUT_WORKSPACE:
259-
'Cannot process multiple files without an open workspace folder.',
259+
'Cannot process multiple files without an open workspace folder',
260260
NO_VALID_FILE_CONTENT_IN_CLIPBOARD:
261-
'No valid file content found in clipboard.',
261+
'No valid file content found in clipboard',
262262
NO_WORKSPACE_PROVIDER: 'No workspace provider available',
263-
NO_WORKSPACE_ROOT: 'No workspace root found.',
263+
NO_WORKSPACE_ROOT: 'No workspace root found',
264264
API_PROVIDER_NOT_SPECIFIED_FOR_CODE_COMPLETIONS:
265-
'API provider is not specified for Code Completions tool.',
265+
'API provider is not specified for Code Completions tool',
266266
MODEL_NOT_SPECIFIED_FOR_CODE_COMPLETIONS:
267-
'Model is not specified for Code Completions tool.',
267+
'Model is not specified for Code Completions tool',
268268
API_KEY_MISSING: 'API key is missing. Please add it in the Settings tab.',
269269
CODE_COMPLETION_ERROR:
270270
'An error occurred during code completion. See console for details.',
271271
REFACTOR_ERROR:
272272
'An error occurred during refactor task. See console for details.',
273273
CONFIGURATION_ALREADY_EXISTS:
274-
'A configuration with these properties already exists.',
275-
CONFIGURATION_NOT_FOUND: 'Configuration not found.',
274+
'A configuration with these properties already exists',
275+
CONFIGURATION_NOT_FOUND: 'Configuration not found',
276276
APPLYING_CHANGES_GENERIC_ERROR: (msg: string) =>
277277
`An error occurred while applying changes: ${msg}`
278278
}

0 commit comments

Comments
 (0)