mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 06:04:43 +00:00
wip inspector
This commit is contained in:
parent
7a5bb2b8b0
commit
f67b6fc4b1
8 changed files with 198 additions and 152 deletions
|
|
@ -51,10 +51,24 @@ const getDefaultEndpoint = () => {
|
|||
return origin;
|
||||
};
|
||||
|
||||
const getInitialConnection = () => {
|
||||
if (typeof window === "undefined") {
|
||||
return { endpoint: "http://127.0.0.1:2468", token: "" };
|
||||
}
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const urlParam = params.get("url")?.trim();
|
||||
const tokenParam = params.get("token") ?? "";
|
||||
return {
|
||||
endpoint: urlParam && urlParam.length > 0 ? urlParam : getDefaultEndpoint(),
|
||||
token: tokenParam
|
||||
};
|
||||
};
|
||||
|
||||
export default function App() {
|
||||
const issueTrackerUrl = "https://github.com/rivet-dev/sandbox-agent/issues/new";
|
||||
const [endpoint, setEndpoint] = useState(getDefaultEndpoint);
|
||||
const [token, setToken] = useState("");
|
||||
const initialConnectionRef = useRef(getInitialConnection());
|
||||
const [endpoint, setEndpoint] = useState(initialConnectionRef.current.endpoint);
|
||||
const [token, setToken] = useState(initialConnectionRef.current.token);
|
||||
const [connected, setConnected] = useState(false);
|
||||
const [connecting, setConnecting] = useState(false);
|
||||
const [connectError, setConnectError] = useState<string | null>(null);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import {
|
|||
Brain,
|
||||
Download,
|
||||
FileDiff,
|
||||
Gauge,
|
||||
GitBranch,
|
||||
HelpCircle,
|
||||
Image,
|
||||
|
|
@ -30,6 +31,7 @@ const badges = [
|
|||
{ key: "sessionLifecycle", label: "Lifecycle", icon: PlayCircle },
|
||||
{ key: "errorEvents", label: "Errors", icon: AlertTriangle },
|
||||
{ key: "reasoning", label: "Reasoning", icon: Brain },
|
||||
{ key: "status", label: "Status", icon: Gauge },
|
||||
{ key: "commandExecution", label: "Commands", icon: Terminal },
|
||||
{ key: "fileChanges", label: "File Changes", icon: FileDiff },
|
||||
{ key: "mcpTools", label: "MCP", icon: Plug },
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ export type AgentCapabilitiesView = AgentCapabilities & {
|
|||
sessionLifecycle?: boolean;
|
||||
errorEvents?: boolean;
|
||||
reasoning?: boolean;
|
||||
status?: boolean;
|
||||
commandExecution?: boolean;
|
||||
fileChanges?: boolean;
|
||||
mcpTools?: boolean;
|
||||
|
|
@ -26,6 +27,7 @@ export const emptyCapabilities: AgentCapabilitiesView = {
|
|||
sessionLifecycle: false,
|
||||
errorEvents: false,
|
||||
reasoning: false,
|
||||
status: false,
|
||||
commandExecution: false,
|
||||
fileChanges: false,
|
||||
mcpTools: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue