diff --git a/frontend/src/settings/ToolConfig.tsx b/frontend/src/settings/ToolConfig.tsx index de99fabf..53eb3984 100644 --- a/frontend/src/settings/ToolConfig.tsx +++ b/frontend/src/settings/ToolConfig.tsx @@ -16,6 +16,9 @@ import { selectToken } from '../preferences/preferenceSlice'; import { APIActionType, APIToolType, UserToolType } from './types'; import { useTranslation } from 'react-i18next'; import { areObjectsEqual } from '../utils/objectUtils'; +import { useDarkTheme } from '../hooks'; +import NoFilesIcon from '../assets/no-files.svg'; +import NoFilesDarkIcon from '../assets/no-files-dark.svg'; export default function ToolConfig({ tool, @@ -44,6 +47,7 @@ export default function ToolConfig({ const [hasUnsavedChanges, setHasUnsavedChanges] = React.useState(false); const [showUnsavedModal, setShowUnsavedModal] = React.useState(false); const { t } = useTranslation(); + const [isDarkTheme] = useDarkTheme(); const handleBackClick = () => { if (hasUnsavedChanges) { @@ -211,201 +215,227 @@ export default function ToolConfig({
Actions
-+ No actions found +
+- {action.name} -
-| Field Name | -Field Type | -Filled by LLM | -FIeld description | -Value | -
|---|---|---|---|---|
| {param[0]} | -{param[1].type} | -- - | -- { - setTool({ - ...tool, - actions: tool.actions.map( - (act, index) => { - if (index === actionIndex) { - return { - ...act, - parameters: { - ...act.parameters, - properties: { - ...act.parameters - .properties, - [param[0]]: { - ...act.parameters - .properties[param[0]], - description: - e.target.value, - }, - }, - }, - }; - } - return act; - }, - ), - }); - }} - > - | -- { - setTool({ - ...tool, - actions: tool.actions.map( - (act, index) => { - if (index === actionIndex) { - return { - ...act, - parameters: { - ...act.parameters, - properties: { - ...act.parameters - .properties, - [param[0]]: { - ...act.parameters - .properties[param[0]], - value: e.target.value, - }, - }, - }, - }; - } - return act; - }, - ), - }); - }} - > - | -
+ {action.name} +
+| Field Name | +Field Type | +Filled by LLM | +FIeld description | +Value | +
|---|---|---|---|---|
| {param[0]} | +{param[1].type} | ++ + | ++ { + setTool({ + ...tool, + actions: tool.actions.map( + (act, index) => { + if (index === actionIndex) { + return { + ...act, + parameters: { + ...act.parameters, + properties: { + ...act.parameters + .properties, + [param[0]]: { + ...act.parameters + .properties[param[0]], + description: + e.target.value, + }, + }, + }, + }; + } + return act; + }, + ), + }); + }} + > + | ++ { + setTool({ + ...tool, + actions: tool.actions.map( + (act, index) => { + if (index === actionIndex) { + return { + ...act, + parameters: { + ...act.parameters, + properties: { + ...act.parameters + .properties, + [param[0]]: { + ...act.parameters + .properties[param[0]], + value: e.target.value, + }, + }, + }, + }; + } + return act; + }, + ), + }); + }} + > + | +
+ No actions found +
+