diff --git a/interface/src/api/client.ts b/interface/src/api/client.ts index 3c2c610e9..6435b3e9c 100644 --- a/interface/src/api/client.ts +++ b/interface/src/api/client.ts @@ -1338,9 +1338,9 @@ export const api = { }, channelStatus: () => fetchJson("/channels/status"), inspectPrompt: (channelId: string) => - fetchJson(`/channels/inspect?channel_id=${encodeURIComponent(channelId)}`), + fetchJson(`/channels/prompt/inspect?channel_id=${encodeURIComponent(channelId)}`), setPromptCapture: async (channelId: string, enabled: boolean) => { - const response = await fetch(`${getApiBase()}/channels/inspect/capture`, { + const response = await fetch(`${getApiBase()}/channels/prompt/capture`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ channel_id: channelId, enabled }), @@ -1350,11 +1350,11 @@ export const api = { }, listPromptSnapshots: (channelId: string, limit = 50) => fetchJson( - `/channels/inspect/snapshots?channel_id=${encodeURIComponent(channelId)}&limit=${limit}`, + `/channels/prompt/snapshots?channel_id=${encodeURIComponent(channelId)}&limit=${limit}`, ), getPromptSnapshot: (channelId: string, timestampMs: number) => fetchJson( - `/channels/inspect/snapshot?channel_id=${encodeURIComponent(channelId)}×tamp_ms=${timestampMs}`, + `/channels/prompt/snapshots/get?channel_id=${encodeURIComponent(channelId)}×tamp_ms=${timestampMs}`, ), workersList: (agentId: string, params: { limit?: number; offset?: number; status?: string } = {}) => { const search = new URLSearchParams({ agent_id: agentId }); @@ -1580,7 +1580,7 @@ export const api = { }, cancelProcess: async (channelId: string, processType: "worker" | "branch", processId: string) => { - const response = await fetch(`${getApiBase()}/channels/cancel`, { + const response = await fetch(`${getApiBase()}/channels/cancel-process`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ channel_id: channelId, process_type: processType, process_id: processId }), @@ -1845,16 +1845,16 @@ export const api = { }, // Update API - updateCheck: () => fetchJson("/update/check"), + updateCheck: () => fetchJson("/update-check"), updateCheckNow: async () => { - const response = await fetch(`${getApiBase()}/update/check`, { method: "POST" }); + const response = await fetch(`${getApiBase()}/update-check`, { method: "POST" }); if (!response.ok) { throw new Error(`API error: ${response.status}`); } return response.json() as Promise; }, updateApply: async () => { - const response = await fetch(`${getApiBase()}/update/apply`, { method: "POST" }); + const response = await fetch(`${getApiBase()}/update-apply`, { method: "POST" }); if (!response.ok) { throw new Error(`API error: ${response.status}`); } @@ -1966,9 +1966,9 @@ export const api = { }, // Agent Groups API - groups: () => fetchJson<{ groups: TopologyGroup[] }>("/groups"), + groups: () => fetchJson<{ groups: TopologyGroup[] }>("/links/groups"), createGroup: async (request: CreateGroupRequest): Promise<{ group: TopologyGroup }> => { - const response = await fetch(`${getApiBase()}/groups`, { + const response = await fetch(`${getApiBase()}/links/groups`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(request), @@ -1980,7 +1980,7 @@ export const api = { }, updateGroup: async (name: string, request: UpdateGroupRequest): Promise<{ group: TopologyGroup }> => { const response = await fetch( - `${getApiBase()}/groups/${encodeURIComponent(name)}`, + `${getApiBase()}/links/groups/${encodeURIComponent(name)}`, { method: "PUT", headers: { "Content-Type": "application/json" }, @@ -1994,7 +1994,7 @@ export const api = { }, deleteGroup: async (name: string): Promise => { const response = await fetch( - `${getApiBase()}/groups/${encodeURIComponent(name)}`, + `${getApiBase()}/links/groups/${encodeURIComponent(name)}`, { method: "DELETE" }, ); if (!response.ok) { @@ -2003,9 +2003,9 @@ export const api = { }, // Humans API - humans: () => fetchJson<{ humans: TopologyHuman[] }>("/humans"), + humans: () => fetchJson<{ humans: TopologyHuman[] }>("/links/humans"), createHuman: async (request: CreateHumanRequest): Promise<{ human: TopologyHuman }> => { - const response = await fetch(`${getApiBase()}/humans`, { + const response = await fetch(`${getApiBase()}/links/humans`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(request), @@ -2017,7 +2017,7 @@ export const api = { }, updateHuman: async (id: string, request: UpdateHumanRequest): Promise<{ human: TopologyHuman }> => { const response = await fetch( - `${getApiBase()}/humans/${encodeURIComponent(id)}`, + `${getApiBase()}/links/humans/${encodeURIComponent(id)}`, { method: "PUT", headers: { "Content-Type": "application/json" }, @@ -2031,7 +2031,7 @@ export const api = { }, deleteHuman: async (id: string): Promise => { const response = await fetch( - `${getApiBase()}/humans/${encodeURIComponent(id)}`, + `${getApiBase()}/links/humans/${encodeURIComponent(id)}`, { method: "DELETE" }, ); if (!response.ok) { diff --git a/interface/src/components/PromptInspectModal.tsx b/interface/src/components/PromptInspectModal.tsx index a1f6ceced..891df20a7 100644 --- a/interface/src/components/PromptInspectModal.tsx +++ b/interface/src/components/PromptInspectModal.tsx @@ -65,7 +65,7 @@ export function PromptInspectModal({ open, onOpenChange, channelId }: PromptInsp return ( - + Prompt Inspector {showContent && !contentLoading && systemPrompt != null && (