|
|
@@ -1,3 +1,5 @@
|
|
|
+import { useCallback } from 'react';
|
|
|
+
|
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
|
|
type Props = {
|
|
|
@@ -5,10 +7,8 @@ type Props = {
|
|
|
}
|
|
|
|
|
|
const presetPrompts = [
|
|
|
- 'sidebar_ai_assistant.preset_prompt.summarize',
|
|
|
- 'sidebar_ai_assistant.preset_prompt.replace',
|
|
|
- 'sidebar_ai_assistant.preset_prompt.correct',
|
|
|
- 'sidebar_ai_assistant.preset_prompt.create',
|
|
|
+ 'summarize',
|
|
|
+ 'correct',
|
|
|
];
|
|
|
|
|
|
export const PresetPromptList: React.FC<Props> = () => {
|
|
|
@@ -21,11 +21,11 @@ export const PresetPromptList: React.FC<Props> = () => {
|
|
|
<button
|
|
|
type="button"
|
|
|
key={presetPrompt}
|
|
|
- className="btn text-body-secondary p-3 rounded-3 border border-1"
|
|
|
+ className="btn text-body-secondary p-3 rounded-3 border border-1"
|
|
|
>
|
|
|
<div className="d-flex align-items-center">
|
|
|
<span className="material-symbols-outlined fs-5 me-3">lightbulb</span>
|
|
|
- <span className="fs-6">{t(presetPrompt)}</span>
|
|
|
+ <span className="fs-6">{t(`sidebar_ai_assistant.preset_prompt.${presetPrompt}.title`)}</span>
|
|
|
</div>
|
|
|
</button>
|
|
|
))}
|