Skip to content

Commit 8eb9f22

Browse files
committed
Split Kimi chatbot into China and Global variants and remove target switch tooltip
- remove 'change target' tooltip ├── README.md ├── apps │ └── editor │ └── src │ └── views │ ├── prompt │ │ └── frontend │ │ ├── Main │ │ │ └── MainView │ │ │ └── MainView.tsx │ │ └── i18n │ │ └── translations │ │ ├── header.ts │ │ └── prompt-field.ts │ └── settings │ └── frontend │ └── Home │ └── sections │ └── WebSection.tsx └── packages └── ui └── src └── components └── editor └── common ├── Tooltip │ ├── Tooltip.module.scss │ ├── Tooltip.tsx │ └── index.ts └── prompts ├── PromptField │ ├── PromptField.module.scss │ ├── PromptField.stories.tsx │ ├── PromptField.tsx │ ├── components │ │ ├── CompletedTasks │ │ │ ├── CompletedTasks.module.scss │ │ │ ├── CompletedTasks.tsx │ │ │ └── index.ts │ │ ├── Footer │ │ │ ├── Footer.module.scss │ │ │ ├── Footer.tsx │ │ │ └── index.ts │ │ └── Tabs │ │ ├── Tabs.module.scss │ │ ├── Tabs.tsx │ │ └── index.ts │ ├── hooks │ │ ├── use-drag-drop.ts │ │ ├── use-dropdown.ts │ │ ├── use-ghost-text.ts │ │ ├── use-handlers │ │ │ ├── handle-copy.ts │ │ │ ├── handle-cut.ts │ │ │ ├── handle-input-change.ts │ │ │ ├── handle-input-click.ts │ │ │ ├── handle-key-down.ts │ │ │ ├── handle-paste.ts │ │ │ ├── handle-submit.ts │ │ │ ├── index.ts │ │ │ ├── types.ts │ │ │ ├── use-handlers.ts │ │ │ └── utils.ts │ │ └── use-keyboard-shortcuts.ts │ └── index.ts ├── Template │ ├── Template.module.scss │ ├── Template.tsx │ └── index.ts └── shared └── symbols ├── caret.ts ├── get-highlighted-text.tsx ├── index.ts ├── position-mapping.ts ├── prompt-symbols.module.scss ├── reconstruct-raw-value.ts └── use-symbol-deletion.ts
1 parent 89bcde1 commit 8eb9f22

6 files changed

Lines changed: 4 additions & 43 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ const chatbot_to_icon: Record<keyof typeof CHATBOTS, Icon.Variant> = {
163163
'GitHub Copilot': 'GITHUB_COPILOT',
164164
Grok: 'GROK',
165165
HuggingChat: 'HUGGING_CHAT',
166-
Kimi: 'KIMI',
166+
'Kimi (China)': 'KIMI',
167+
'Kimi (Global)': 'KIMI',
167168
Mistral: 'MISTRAL',
168169
'Meta AI': 'META',
169170
Arena: 'ARENA',
@@ -555,7 +556,6 @@ export const MainView: React.FC<Props> = (props) => {
555556
completed_tasks: t('prompt-field.completed-tasks'),
556557
completed_task: t('prompt-field.completed-task'),
557558
clear_session: t('prompt-field.clear-session'),
558-
change_target: t('prompt-field.change-target'),
559559
mark_as_complete: t('prompt-field.mark-as-complete'),
560560
new_tab: t('prompt-field.new-tab'),
561561
clear_tab: t('prompt-field.clear-tab'),

‎apps/editor/src/views/prompt/frontend/i18n/translations/prompt-field.ts‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -413,24 +413,6 @@ export const prompt_field = {
413413
hu: 'Munkamenet törlése',
414414
bg: 'Изчистване на сесията'
415415
},
416-
'prompt-field.change-target': {
417-
en: 'Change target',
418-
pl: 'Zmień cel',
419-
'zh-cn': '更改目标',
420-
ja: 'ターゲットを変更',
421-
'zh-tw': '更改目標',
422-
de: 'Ziel ändern',
423-
es: 'Cambiar objetivo',
424-
fr: 'Changer la cible',
425-
'pt-br': 'Alterar alvo',
426-
ru: 'Изменить цель',
427-
ko: '대상 변경',
428-
it: 'Cambia destinazione',
429-
tr: 'Hedefi değiştir',
430-
cs: 'Změnit cíl',
431-
hu: 'Cél módosítása',
432-
bg: 'Промяна на целта'
433-
},
434416
'prompt-field.mark-as-complete': {
435417
en: 'Mark as complete',
436418
pl: 'Oznacz jako ukończone',

‎apps/editor/src/views/settings/frontend/Home/sections/WebSection.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ const chatbot_to_icon: Record<keyof typeof CHATBOTS, Icon.Variant> = {
4848
'GitHub Copilot': 'GITHUB_COPILOT',
4949
Grok: 'GROK',
5050
HuggingChat: 'HUGGING_CHAT',
51-
Kimi: 'KIMI',
51+
'Kimi (China)': 'KIMI',
52+
'Kimi (Global)': 'KIMI',
5253
Mistral: 'MISTRAL',
5354
'Meta AI': 'META',
5455
Arena: 'ARENA',

‎packages/ui/src/components/editor/common/prompts/PromptField/PromptField.stories.tsx‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ export const Empty = () => (
6868
completed_tasks: 'Completed tasks',
6969
completed_task: 'Completed task',
7070
clear_session: 'Clear session',
71-
change_target: 'Change target',
7271
mark_as_complete: 'Mark as complete',
7372
new_tab: 'New tab',
7473
clear_tab: 'Clear tab',
@@ -140,7 +139,6 @@ export const WithText = () => (
140139
completed_tasks: 'Completed tasks',
141140
completed_task: 'Completed task',
142141
clear_session: 'Clear session',
143-
change_target: 'Change target',
144142
mark_as_complete: 'Mark as complete',
145143
new_tab: 'New tab',
146144
clear_tab: 'Clear tab',
@@ -212,7 +210,6 @@ export const LongText = () => (
212210
completed_tasks: 'Completed tasks',
213211
completed_task: 'Completed task',
214212
clear_session: 'Clear session',
215-
change_target: 'Change target',
216213
mark_as_complete: 'Mark as complete',
217214
new_tab: 'New tab',
218215
clear_tab: 'Clear tab',
@@ -284,7 +281,6 @@ export const WithPlaceholderSavedContext = () => (
284281
completed_tasks: 'Completed tasks',
285282
completed_task: 'Completed task',
286283
clear_session: 'Clear session',
287-
change_target: 'Change target',
288284
mark_as_complete: 'Mark as complete',
289285
new_tab: 'New tab',
290286
clear_tab: 'Clear tab',
@@ -356,7 +352,6 @@ export const WithCommit = () => (
356352
completed_tasks: 'Completed tasks',
357353
completed_task: 'Completed task',
358354
clear_session: 'Clear session',
359-
change_target: 'Change target',
360355
mark_as_complete: 'Mark as complete',
361356
new_tab: 'New tab',
362357
clear_tab: 'Clear tab',
@@ -427,7 +422,6 @@ export const WithCommitWithQuotes = () => (
427422
completed_tasks: 'Completed tasks',
428423
completed_task: 'Completed task',
429424
clear_session: 'Clear session',
430-
change_target: 'Change target',
431425
mark_as_complete: 'Mark as complete',
432426
new_tab: 'New tab',
433427
clear_tab: 'Clear tab',
@@ -506,7 +500,6 @@ export const WithEditFormatSelector = () => {
506500
completed_tasks: 'Completed tasks',
507501
completed_task: 'Completed task',
508502
clear_session: 'Clear session',
509-
change_target: 'Change target',
510503
mark_as_complete: 'Mark as complete',
511504
new_tab: 'New tab',
512505
clear_tab: 'Clear tab',
@@ -577,7 +570,6 @@ export const WithWarning = () => (
577570
completed_tasks: 'Completed tasks',
578571
completed_task: 'Completed task',
579572
clear_session: 'Clear session',
580-
change_target: 'Change target',
581573
mark_as_complete: 'Mark as complete',
582574
new_tab: 'New tab',
583575
clear_tab: 'Clear tab',
@@ -649,7 +641,6 @@ export const WithFilePaths = () => (
649641
completed_tasks: 'Completed tasks',
650642
completed_task: 'Completed task',
651643
clear_session: 'Clear session',
652-
change_target: 'Change target',
653644
mark_as_complete: 'Mark as complete',
654645
new_tab: 'New tab',
655646
clear_tab: 'Clear tab',
@@ -749,7 +740,6 @@ export const WithTabs = () => {
749740
completed_tasks: 'Completed tasks',
750741
completed_task: 'Completed task',
751742
clear_session: 'Clear session',
752-
change_target: 'Change target',
753743
mark_as_complete: 'Mark as complete',
754744
new_tab: 'New tab',
755745
clear_tab: 'Clear tab',

‎packages/ui/src/components/editor/common/prompts/PromptField/PromptField.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ export namespace PromptField {
119119
completed_tasks: string
120120
completed_task: string
121121
clear_session: string
122-
change_target: string
123122
mark_as_complete: string
124123
new_tab: string
125124
clear_tab: string

‎packages/ui/src/components/editor/common/prompts/PromptField/components/Footer/Footer.tsx‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export const Footer: React.FC<Props> = (props) => {
2626
const [show_submit_tooltip, set_show_submit_tooltip] = useState(false)
2727
const [is_recording_hovered, set_is_recording_hovered] = useState(false)
2828
const [is_edit_format_hovered, set_is_edit_format_hovered] = useState(false)
29-
const [is_target_hovered, set_is_target_hovered] = useState(false)
3029
const [is_target_dropdown_open, set_is_target_dropdown_open] = useState(false)
3130
const [hovered_left_action, set_hovered_left_action] = useState<
3231
'at' | 'hash' | 'slash' | null
@@ -421,14 +420,6 @@ export const Footer: React.FC<Props> = (props) => {
421420
>
422421
{props.props.target && props.props.on_target_change && (
423422
<div className={styles['footer__right__target-switch']}>
424-
{is_target_hovered &&
425-
!is_target_dropdown_open &&
426-
!props.is_alt_pressed && (
427-
<Tooltip
428-
message={props.props.translations.change_target}
429-
align="center"
430-
/>
431-
)}
432423
{(is_target_dropdown_open || props.is_alt_pressed) && (
433424
<div
434425
className={
@@ -477,8 +468,6 @@ export const Footer: React.FC<Props> = (props) => {
477468
e.stopPropagation()
478469
set_is_target_dropdown_open(!is_target_dropdown_open)
479470
}}
480-
onMouseEnter={() => set_is_target_hovered(true)}
481-
onMouseLeave={() => set_is_target_hovered(false)}
482471
>
483472
<span className={styles['footer__right__target-switch__label']}>
484473
{props.props.target == 'WEB'

0 commit comments

Comments
 (0)