mirror of
https://github.com/geoffsee/open-gsio.git
synced 2025-09-08 22:56:46 +00:00

Update README deployment steps and add deploy:secrets script to package.json update local inference script and README update lockfile reconfigure package scripts for development update test execution pass server tests Update README with revised Bun commands and workspace details remove pnpm package manager designator create bun server
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
import React from "react";
|
|
import { observer } from "mobx-react-lite";
|
|
import clientChatStore from "../../stores/ClientChatStore";
|
|
|
|
export const IntermediateStepsComponent = observer(({ hidden }) => {
|
|
return (
|
|
<div hidden={hidden}>
|
|
{clientChatStore.intermediateSteps.map((step, index) => {
|
|
switch (step.kind) {
|
|
case "web-search": {
|
|
return <WebSearchResult key={index} data={step.data} />;
|
|
}
|
|
case "tool-result":
|
|
return <ToolResult key={index} data={step.data} />;
|
|
default:
|
|
return <GenericStep key={index} data={step.data} />;
|
|
}
|
|
})}
|
|
</div>
|
|
);
|
|
});
|
|
|
|
const WebSearchResult = () => {
|
|
return (
|
|
<div>
|
|
{/*{webResults?.map(r => <Box>*/}
|
|
{/* <Text>{r.title}</Text>*/}
|
|
{/* <Text>{r.url}</Text>*/}
|
|
{/* <Text>{r.snippet}</Text>*/}
|
|
{/*</Box>)}*/}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export const ToolResult = ({ data }) => {
|
|
return (
|
|
<div className="tool-result">
|
|
<h3>Tool Result</h3>
|
|
<pre>{JSON.stringify(data, null, 2)}</pre>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export const GenericStep = ({ data }) => {
|
|
return (
|
|
<div className="generic-step">
|
|
<h3>Generic Step</h3>
|
|
<p>{data.description || "No additional information provided."}</p>
|
|
</div>
|
|
);
|
|
};
|