Converts hardcoded UI copy to i18n keys across the app, adds global translation for non-component modules, and splits the English catalog into feature modules with duplicate-key detection.
18 lines
617 B
TypeScript
18 lines
617 B
TypeScript
import type { ToolRenderer } from "../types"
|
|
|
|
export const questionRenderer: ToolRenderer = {
|
|
tools: ["question"],
|
|
getAction: ({ t }) => t("toolCall.question.action.awaitingAnswers"),
|
|
getTitle({ toolState, t }) {
|
|
const state = toolState()
|
|
if (!state) return t("toolCall.question.title.questions")
|
|
if (state.status === "completed") return t("toolCall.question.title.questions")
|
|
return t("toolCall.question.title.askingQuestions")
|
|
},
|
|
renderBody() {
|
|
// The question tool UI is rendered by ToolCall itself so
|
|
// it can share the same layout for pending/completed.
|
|
return null
|
|
},
|
|
}
|