mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-01 17:39:39 +02:00
Merge commit 'a8390532f7' as 'ai-context/workbench-ui'
This commit is contained in:
commit
1a72bfdec0
310 changed files with 56430 additions and 0 deletions
35
ai-context/workbench-ui/src/components/agents/Tools.tsx
Normal file
35
ai-context/workbench-ui/src/components/agents/Tools.tsx
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import React, { useState } from "react";
|
||||
|
||||
import { useAgentTools } from "@trustgraph/react-state";
|
||||
import EditDialog from "./EditDialog";
|
||||
import Controls from "./Controls";
|
||||
import ToolsTable from "./ToolsTable";
|
||||
|
||||
const Tools = () => {
|
||||
const toolsState = useAgentTools();
|
||||
const [selected, setSelected] = useState("");
|
||||
|
||||
const onComplete = () => {
|
||||
setSelected("");
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<EditDialog
|
||||
open={selected != ""}
|
||||
onOpenChange={() => setSelected("")}
|
||||
onComplete={() => onComplete()}
|
||||
create={false}
|
||||
id={selected}
|
||||
/>
|
||||
<ToolsTable
|
||||
selected={selected}
|
||||
setSelected={setSelected}
|
||||
tools={toolsState.tools}
|
||||
/>
|
||||
<Controls />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Tools;
|
||||
Loading…
Add table
Add a link
Reference in a new issue