Skip to content

Commit e06d2e2

Browse files
committed
Update prompt symbol simplification and enforce required UI component translations
- revert all those lint fixes [Changes] - should simplify snippet symbol - simplification of symbols 'accuracy boost' and 'snippet' should result in their removal - 'snippet' in polish is still 'snippet'. I don't know about other languages, could be. [Pasted text] - we found untranslated elements here [Image] - never assign default value after translation e.g. t('x') || 'X', rely 100% on translations, without 'as any' ├── apps │ └── editor │ └── src │ ├── commands │ │ ├── apply-response-command │ │ │ ├── response-processor │ │ │ │ ├── handlers │ │ │ │ │ ├── patch-repair-handler.ts │ │ │ │ │ └── search-replace-handler.ts │ │ │ │ └── response-processor.ts │ │ │ └── utils │ │ │ ├── file-operations │ │ │ │ ├── prepare-rename-operation.ts │ │ │ │ └── read-rename-source-file.ts │ │ │ └── preview │ │ │ ├── build-history-files.ts │ │ │ ├── file-preparer.ts │ │ │ └── vscode-ui.ts │ │ ├── copy-merge-commit-details-command.ts │ │ ├── generate-commit-message-commands │ │ │ ├── actions │ │ │ │ └── run-generate-action.ts │ │ │ └── utils │ │ │ ├── build-commit-message-prompt.ts │ │ │ └── generate-commit-message-with-api.ts │ │ ├── history-command │ │ │ └── history-command.ts │ │ ├── new-folder-command.ts │ │ ├── rename-command.ts │ │ ├── search-files-commands │ │ │ └── utils │ │ │ └── get-target-folder-path.ts │ │ ├── select-files-of-commit-command.ts │ │ └── set-ranges-command.ts │ ├── features │ │ └── search-files │ │ └── utils │ │ └── analyze-files.ts │ ├── i18n │ │ ├── index.ts │ │ └── translations │ │ ├── commands │ │ │ ├── generate-commit-message-command.ts │ │ │ ├── index.ts │ │ │ └── rename-command.ts │ │ ├── services │ │ │ ├── index.ts │ │ │ └── prompt-view-api-calls-manager.ts │ │ ├── utils │ │ │ ├── index.ts │ │ │ └── show-parent-folder-quick-pick.ts │ │ └── views │ │ ├── index.ts │ │ ├── prompt │ │ │ ├── handlers │ │ │ │ ├── handle-patch-repair.ts │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── prompt-view-provider.ts │ │ └── shared │ │ ├── actions │ │ │ ├── api │ │ │ │ ├── create │ │ │ │ │ ├── index.ts │ │ │ │ │ └── interactions │ │ │ │ │ ├── index.ts │ │ │ │ │ └── verify-model-errors.ts │ │ │ │ ├── index.ts │ │ │ │ └── update │ │ │ │ ├── index.ts │ │ │ │ └── interactions │ │ │ │ ├── edit-model-for-api-config.ts │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── index.ts │ │ └── utils │ │ ├── hash-sign-quick-pick.ts │ │ └── index.ts │ ├── services │ │ ├── prompt-view-api-calls-manager.ts │ │ └── websocket-manager.ts │ ├── utils │ │ ├── agentic-cli-invocation │ │ │ ├── invoke-agentic-cli.ts │ │ │ └── utils │ │ │ └── check-command-exists.ts │ │ ├── commit-message-details.ts │ │ ├── git-repository-utils.ts │ │ ├── path-sanitizer.ts │ │ └── show-parent-folder-quick-pick.ts │ └── views │ ├── prompt │ │ ├── backend │ │ │ ├── message-handlers │ │ │ │ ├── handle-paste-url.ts │ │ │ │ ├── handle-patch-repair.ts │ │ │ │ ├── handle-preview-generated-code.ts │ │ │ │ └── utils │ │ │ │ └── build-cli-prompt.ts │ │ │ ├── prompt-view-provider.ts │ │ │ └── utils │ │ │ ├── persistent-text-storage.ts │ │ │ ├── preview-text-in-temp-file.ts │ │ │ ├── symbols │ │ │ │ ├── fragment │ │ │ │ │ └── replace-fragment-symbol.ts │ │ │ │ ├── image │ │ │ │ │ └── replace-image-symbol.ts │ │ │ │ ├── pasted-text │ │ │ │ │ └── replace-pasted-text-symbol.ts │ │ │ │ ├── replace-symbols.ts │ │ │ │ ├── snippet │ │ │ │ │ └── replace-snippet-symbol.ts │ │ │ │ └── website │ │ │ │ └── replace-website-symbol.ts │ │ │ └── website-fetcher.ts │ │ └── frontend │ │ ├── Main │ │ │ └── MainView │ │ │ ├── MainView.tsx │ │ │ └── components │ │ │ └── Header │ │ │ └── Header.tsx │ │ ├── Prompt.tsx │ │ └── i18n │ │ ├── translations │ │ │ ├── actions.ts │ │ │ ├── index.ts │ │ │ ├── main.ts │ │ │ └── recent-donations.ts │ │ └── use-translation.tsx │ ├── settings │ │ ├── backend │ │ │ └── message-handlers │ │ │ ├── add-provider │ │ │ │ └── pick-extended-provider.ts │ │ │ ├── handle-delete-prompt-instruction.ts │ │ │ ├── handle-open-allow-patterns-settings.ts │ │ │ └── handle-open-ignore-patterns-settings.ts │ │ └── frontend │ │ ├── Home │ │ │ └── sections │ │ │ └── GeneralSection.tsx │ │ ├── Settings.tsx │ │ ├── forms │ │ │ └── SnippetsForm │ │ │ └── SnippetsForm.tsx │ │ └── i18n │ │ └── translations │ │ ├── general.ts │ │ └── index.ts │ └── shared │ ├── actions │ │ └── api │ │ ├── create │ │ │ └── interactions │ │ │ ├── initial-select-model.ts │ │ │ └── verify-model.ts │ │ └── update │ │ └── interactions │ │ └── edit-model-for-api-config.ts │ ├── hooks │ │ └── use-translation.tsx │ └── utils │ └── hash-sign-quick-pick │ ├── hash-sign-quick-pick.ts │ └── symbols │ ├── changes-symbol.ts │ ├── commit-symbol.ts │ ├── saved-context-symbol.ts │ └── snippet-symbol.ts └── packages ├── shared │ └── src │ └── utils │ └── simplify-prompt-symbols │ ├── index.ts │ ├── simplify-prompt-symbols.spec.ts │ └── simplify-prompt-symbols.ts └── ui ├── package.json ├── src │ └── components │ └── editor │ ├── common │ │ └── prompts │ │ └── shared │ │ └── symbols │ │ └── reconstruct-raw-value.ts │ └── prompt-view │ ├── RecentDonations │ │ ├── RecentDonations.module.scss │ │ ├── RecentDonations.stories.tsx │ │ └── RecentDonations.tsx │ ├── ResponsePreview │ │ └── ResponsePreview.tsx │ ├── Responses │ │ └── Responses.tsx │ └── Tasks │ ├── Tasks.tsx │ └── components │ └── TaskGroup.tsx └── tsconfig.json
1 parent 8ac1931 commit e06d2e2

33 files changed

Lines changed: 297 additions & 117 deletions

File tree

‎apps/editor/src/commands/generate-commit-message-commands/actions/run-generate-action.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export const run_generate_action = async (params: {
167167
'command.generate-commit-message-command.action-quick-pick.title'
168168
)
169169
quick_pick.placeholder = t(
170-
'command.generate-commit-message-command.action-quick-pick.placeholder' as any,
170+
'command.generate-commit-message-command.action-quick-pick.placeholder',
171171
{ tokens: display_token_count(base_token_count) }
172172
)
173173
quick_pick.ignoreFocusOut = show_back_button

‎apps/editor/src/commands/generate-commit-message-commands/utils/generate-commit-message-with-api.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const generate_commit_message_with_api = async (params: {
5050

5151
progress.report({
5252
message: t(
53-
'command.generate-commit-message-command.progress.sent-tokens' as any,
53+
'command.generate-commit-message-command.progress.sent-tokens',
5454
{
5555
tokens: display_token_count(token_count)
5656
}

‎apps/editor/src/commands/rename-command.ts‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,9 @@ export const rename_command = () => {
3737
try {
3838
await vscode.workspace.fs.stat(vscode.Uri.file(new_path))
3939
vscode.window.showInformationMessage(
40-
t(
41-
'command.rename-command.info.file-or-folder-already-exists' as any,
42-
{
43-
name: path.basename(new_path)
44-
}
45-
)
40+
t('command.rename-command.info.file-or-folder-already-exists', {
41+
name: path.basename(new_path)
42+
})
4643
)
4744
return
4845
} catch {

‎apps/editor/src/i18n/translations/views/shared/utils/hash-sign-quick-pick.ts‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ export const translations = {
410410
},
411411
'views.shared.utils.hash-sign-quick-pick.snippet-symbol.no-instructions': {
412412
en: 'No snippets found.',
413-
pl: 'Nie znaleziono fragmentów.',
413+
pl: 'Nie znaleziono snippetów.',
414414
'zh-cn': '未找到片段。',
415415
ja: 'スニペットが見つかりません。',
416416
'zh-tw': '未找到片段。',
@@ -428,7 +428,7 @@ export const translations = {
428428
},
429429
'views.shared.utils.hash-sign-quick-pick.snippet-symbol.placeholder': {
430430
en: 'Select snippet',
431-
pl: 'Wybierz fragment',
431+
pl: 'Wybierz snippet',
432432
'zh-cn': '选择片段',
433433
ja: 'スニペットを選択',
434434
'zh-tw': '選擇片段',
@@ -446,7 +446,7 @@ export const translations = {
446446
},
447447
'views.shared.utils.hash-sign-quick-pick.snippet-symbol.title': {
448448
en: 'Snippets',
449-
pl: 'Fragmenty',
449+
pl: 'Snippety',
450450
'zh-cn': '片段',
451451
ja: 'スニペット',
452452
'zh-tw': '片段',
@@ -462,23 +462,23 @@ export const translations = {
462462
hu: 'Töredékek',
463463
bg: 'Фрагменти'
464464
},
465-
'views.shared.utils.hash-sign-quick-pick.quick-pick.snippets.label': {
466-
en: 'Snippets',
467-
pl: 'Fragmenty',
465+
'views.shared.utils.hash-sign-quick-pick.quick-pick.snippet.label': {
466+
en: 'Snippet',
467+
pl: 'Snippet',
468468
'zh-cn': '片段',
469469
ja: 'スニペット',
470470
'zh-tw': '片段',
471471
de: 'Schnipsel',
472-
es: 'Fragmentos',
473-
fr: 'Extraits',
474-
'pt-br': 'Snippets',
475-
ru: 'Фрагменты',
472+
es: 'Fragmento',
473+
fr: 'Extrait',
474+
'pt-br': 'Snippet',
475+
ru: 'Фрагмент',
476476
ko: '스니펫',
477477
it: 'Snippet',
478-
tr: 'Parçalar',
479-
cs: 'Fragmenty',
480-
hu: 'Töredékek',
481-
bg: 'Фрагменти'
478+
tr: 'Parça',
479+
cs: 'Fragment',
480+
hu: 'Töredék',
481+
bg: 'Фрагмент'
482482
},
483483
'views.shared.utils.hash-sign-quick-pick.quick-pick.snippets.description': {
484484
en: 'Reusable instructions',

‎apps/editor/src/services/prompt-view-api-calls-manager.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export class PromptViewApiCallsManager {
164164
const msg =
165165
tokens_per_second && total_tokens
166166
? t(
167-
'service.prompt-view-api-calls-manager.progress.receiving-stats' as any,
167+
'service.prompt-view-api-calls-manager.progress.receiving-stats',
168168
{
169169
total_tokens: display_token_count(total_tokens),
170170
tokens_per_second: Math.round(tokens_per_second)

‎apps/editor/src/utils/show-parent-folder-quick-pick.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const show_parent_folder_quick_pick = async (params: {
4949
'utils.show-parent-folder-quick-pick.parent-folders'
5050
)
5151
folder_quick_pick.placeholder = t(
52-
'utils.show-parent-folder-quick-pick.placeholder.select-item-to-add-to-context' as any,
52+
'utils.show-parent-folder-quick-pick.placeholder.select-item-to-add-to-context',
5353
{ item: 'folder' }
5454
)
5555
folder_quick_pick.items = folders.map((f) => ({

‎apps/editor/src/views/prompt/backend/message-handlers/handle-patch-repair.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ export const handle_patch_repair = async (params: {
569569

570570
vscode.window.showErrorMessage(
571571
t(
572-
'views.prompt.handlers.handle-patch-repair.error.applying-changes-generic-error' as any,
572+
'views.prompt.handlers.handle-patch-repair.error.applying-changes-generic-error',
573573
{
574574
msg: error_msg
575575
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ export class PromptViewProvider implements vscode.WebviewViewProvider {
940940
})
941941
vscode.window.showErrorMessage(
942942
t(
943-
'views.prompt.prompt-view-provider.error.error-handling-message' as any,
943+
'views.prompt.prompt-view-provider.error.error-handling-message',
944944
{
945945
message: get_error_message(error)
946946
}

‎apps/editor/src/views/prompt/frontend/Main/MainView/MainView.tsx‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -606,8 +606,8 @@ export const MainView: React.FC<Props> = (props) => {
606606
on_selected_history_item_change={() => {}}
607607
on_response_history_item_remove={() => {}}
608608
translations={{
609-
applied_manually: '',
610-
reject: ''
609+
applied_manually: t('main.applied-manually'),
610+
reject: t('action.reject')
611611
}}
612612
/>
613613
)}
@@ -641,8 +641,8 @@ export const MainView: React.FC<Props> = (props) => {
641641
on_selected_history_item_change={() => {}}
642642
on_response_history_item_remove={() => {}}
643643
translations={{
644-
applied_manually: '',
645-
reject: ''
644+
applied_manually: t('main.applied-manually'),
645+
reject: t('action.reject')
646646
}}
647647
/>
648648
)}
@@ -658,8 +658,8 @@ export const MainView: React.FC<Props> = (props) => {
658658
on_selected_history_item_change={() => {}}
659659
on_response_history_item_remove={() => {}}
660660
translations={{
661-
applied_manually: '',
662-
reject: ''
661+
applied_manually: t('main.applied-manually'),
662+
reject: t('action.reject')
663663
}}
664664
/>
665665
)}
@@ -711,10 +711,10 @@ export const MainView: React.FC<Props> = (props) => {
711711
selected_configuration_id={props.selected_web_configuration_name}
712712
translations={{
713713
empty: t('chatbots.empty'),
714-
add_new: t('action.add-new'),
715-
pin: t('action.pin'),
716-
unpin: t('action.unpin'),
717-
insert: t('action.insert'),
714+
add_new: t('actions.add-new'),
715+
pin: t('actions.pin'),
716+
unpin: t('actions.unpin'),
717+
insert: t('actions.insert'),
718718
edit: t('action.edit'),
719719
delete: t('action.delete')
720720
}}
@@ -737,10 +737,10 @@ export const MainView: React.FC<Props> = (props) => {
737737
empty_landscape_placeholder_below={configurations_placeholder_below}
738738
translations={{
739739
empty: t('configurations.empty'),
740-
add_new: t('action.add-new'),
741-
pin: t('action.pin'),
742-
unpin: t('action.unpin'),
743-
insert: t('action.insert'),
740+
add_new: t('actions.add-new'),
741+
pin: t('actions.pin'),
742+
unpin: t('actions.unpin'),
743+
insert: t('actions.insert'),
744744
edit: t('action.edit'),
745745
delete: t('action.delete')
746746
}}
@@ -773,10 +773,10 @@ export const MainView: React.FC<Props> = (props) => {
773773
selected_configuration_id={props.selected_cli_configuration_name}
774774
translations={{
775775
empty: t('agents.empty'),
776-
add_new: t('action.add-new'),
777-
pin: t('action.pin'),
778-
unpin: t('action.unpin'),
779-
insert: t('action.insert'),
776+
add_new: t('actions.add-new'),
777+
pin: t('actions.pin'),
778+
unpin: t('actions.unpin'),
779+
insert: t('actions.insert'),
780780
edit: t('action.edit'),
781781
delete: t('action.delete')
782782
}}

‎apps/editor/src/views/prompt/frontend/Main/MainView/components/Header/Header.tsx‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ export const Header: React.FC<Props> = (props) => {
9999
on_selected_history_item_change={() => {}}
100100
on_response_history_item_remove={() => {}}
101101
translations={{
102-
applied_manually: '',
103-
reject: ''
102+
applied_manually: t('main.applied-manually'),
103+
reject: t('action.reject')
104104
}}
105105
/>
106106
)}
@@ -128,8 +128,8 @@ export const Header: React.FC<Props> = (props) => {
128128
on_selected_history_item_change={() => {}}
129129
on_response_history_item_remove={() => {}}
130130
translations={{
131-
applied_manually: '',
132-
reject: ''
131+
applied_manually: t('main.applied-manually'),
132+
reject: t('action.reject')
133133
}}
134134
/>
135135
)}
@@ -176,8 +176,8 @@ export const Header: React.FC<Props> = (props) => {
176176
on_selected_history_item_change={() => {}}
177177
on_response_history_item_remove={() => {}}
178178
translations={{
179-
applied_manually: '',
180-
reject: ''
179+
applied_manually: t('main.applied-manually'),
180+
reject: t('action.reject')
181181
}}
182182
/>
183183
)}

0 commit comments

Comments
 (0)