mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Improve tool calling i18n
This commit is contained in:
7 files changed
+16
-16
No files matched your search
@@ -578,13 +578,13 @@ export const ChatPane = forwardRef<ChatPaneRef, ChatPaneProps>(({
|
||||
isCurrentlyLoading={isLoading}
|
||||
/>
|
||||
)}
|
||||
{/* "Calling <tool>..." if streaming tool call is in progress */}
|
||||
{/* "Running <tool>..." if streaming tool call is in progress */}
|
||||
{(streamingToolCall?.type === 'function') ? (
|
||||
<div key="tool-calls-loading" className="-mt-2">
|
||||
<div className="flex items-center gap-2 px-2 py-1 text-xs text-muted-foreground">
|
||||
<Loader2 className="h-3 w-3 animate-spin flex-shrink-0" />
|
||||
<span className="font-medium">
|
||||
{t('calling')} {streamingToolCall.function?.name || 'tool'}...
|
||||
{t('runningTool', { tool: streamingToolCall.function.name })}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -609,14 +609,14 @@ export const ChatPane = forwardRef<ChatPaneRef, ChatPaneProps>(({
|
||||
const lastMessage = messages[messages.length - 1] as AIMessage | undefined;
|
||||
const lastToolCall = lastMessage?.role === 'assistant' ? lastMessage?.tool_calls?.[0] : undefined;
|
||||
|
||||
// "Running <tool>..." if last tool call is still executing
|
||||
// "Waiting for <tool>..." if last tool call is still executing
|
||||
if (lastToolCall?.type === 'function') {
|
||||
return (
|
||||
<div key="tool-running-loading" className="-mt-2">
|
||||
<div className="flex items-center gap-2 px-2 py-1 text-xs text-muted-foreground">
|
||||
<Loader2 className="h-3 w-3 animate-spin flex-shrink-0" />
|
||||
<span className="font-medium">
|
||||
{t('running')} {lastToolCall.function.name}...
|
||||
{t('waitingForTool', { tool: lastToolCall.function.name })}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+2
-2
@@ -131,8 +131,8 @@
|
||||
"selectModelFirst": "Please select a model to start chatting...",
|
||||
"sendMessage": "Send message",
|
||||
"stopGeneration": "Stop generation",
|
||||
"calling": "Calling",
|
||||
"running": "Running",
|
||||
"runningTool": "Running {{tool}}...",
|
||||
"waitingForTool": "Waiting for {{tool}}...",
|
||||
"chat": "Chat",
|
||||
"preview": "Preview",
|
||||
"code": "Code",
|
||||
|
||||
+2
-2
@@ -124,8 +124,8 @@
|
||||
"selectModelFirst": "Da fatan za a zaɓi samfuri don farawa hira...",
|
||||
"sendMessage": "Aika saƙo",
|
||||
"stopGeneration": "Tsayar da samarwa",
|
||||
"calling": "Ana kira",
|
||||
"running": "Ana gudana",
|
||||
"runningTool": "Ana gudana {{tool}}...",
|
||||
"waitingForTool": "Ana jiran {{tool}}...",
|
||||
"chat": "Hira",
|
||||
"preview": "Duba",
|
||||
"code": "Lambar",
|
||||
|
||||
+2
-2
@@ -124,8 +124,8 @@
|
||||
"selectModelFirst": "Biko họrọ ụdịdị iji malite ikwu okwu...",
|
||||
"sendMessage": "Ziga ozi",
|
||||
"stopGeneration": "Kwụsị mmepụta",
|
||||
"calling": "Na-akpọ",
|
||||
"running": "Na-agba ọsọ",
|
||||
"runningTool": "Na-agba ọsọ {{tool}}...",
|
||||
"waitingForTool": "Na-eche {{tool}}...",
|
||||
"chat": "Nkata",
|
||||
"preview": "Nlele",
|
||||
"code": "Koodu",
|
||||
|
||||
+2
-2
@@ -126,8 +126,8 @@
|
||||
"selectModelFirst": "Selecione um modelo para começar a conversar...",
|
||||
"sendMessage": "Enviar mensagem",
|
||||
"stopGeneration": "Parar geração",
|
||||
"calling": "Chamando",
|
||||
"running": "Executando",
|
||||
"runningTool": "Executando {{tool}}...",
|
||||
"waitingForTool": "Aguardando {{tool}}...",
|
||||
"chat": "Chat",
|
||||
"preview": "Visualização",
|
||||
"code": "Código",
|
||||
|
||||
+2
-2
@@ -124,8 +124,8 @@
|
||||
"selectModelFirst": "Jọwọ yan awoṣe lati bẹrẹ ibaraẹnisọrọ...",
|
||||
"sendMessage": "Fi ifiranṣẹ ranṣẹ",
|
||||
"stopGeneration": "Duro ṣiṣẹda",
|
||||
"calling": "N pe",
|
||||
"running": "N ṣiṣẹ",
|
||||
"runningTool": "N ṣiṣẹ {{tool}}...",
|
||||
"waitingForTool": "N duro de {{tool}}...",
|
||||
"chat": "Ibaraẹnisọrọ",
|
||||
"preview": "Aṣaju wiwo",
|
||||
"code": "Koodu",
|
||||
|
||||
+2
-2
@@ -126,8 +126,8 @@
|
||||
"selectModelFirst": "请先选择一个模型开始聊天...",
|
||||
"sendMessage": "发送消息",
|
||||
"stopGeneration": "停止生成",
|
||||
"calling": "调用中",
|
||||
"running": "运行中",
|
||||
"runningTool": "运行{{tool}}中...",
|
||||
"waitingForTool": "等待{{tool}}...",
|
||||
"chat": "聊天",
|
||||
"preview": "预览",
|
||||
"code": "代码",
|
||||
|
||||
Reference in new issue
Block a user