Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions interface/src/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1338,9 +1338,9 @@ export const api = {
},
channelStatus: () => fetchJson<ChannelStatusResponse>("/channels/status"),
inspectPrompt: (channelId: string) =>
fetchJson<PromptInspectResponse>(`/channels/inspect?channel_id=${encodeURIComponent(channelId)}`),
fetchJson<PromptInspectResponse>(`/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 }),
Expand All @@ -1350,11 +1350,11 @@ export const api = {
},
listPromptSnapshots: (channelId: string, limit = 50) =>
fetchJson<PromptSnapshotListResponse>(
`/channels/inspect/snapshots?channel_id=${encodeURIComponent(channelId)}&limit=${limit}`,
`/channels/prompt/snapshots?channel_id=${encodeURIComponent(channelId)}&limit=${limit}`,
),
getPromptSnapshot: (channelId: string, timestampMs: number) =>
fetchJson<PromptSnapshot>(
`/channels/inspect/snapshot?channel_id=${encodeURIComponent(channelId)}&timestamp_ms=${timestampMs}`,
`/channels/prompt/snapshots/get?channel_id=${encodeURIComponent(channelId)}&timestamp_ms=${timestampMs}`,
),
workersList: (agentId: string, params: { limit?: number; offset?: number; status?: string } = {}) => {
const search = new URLSearchParams({ agent_id: agentId });
Expand Down Expand Up @@ -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 }),
Expand Down Expand Up @@ -1845,16 +1845,16 @@ export const api = {
},

// Update API
updateCheck: () => fetchJson<UpdateStatus>("/update/check"),
updateCheck: () => fetchJson<UpdateStatus>("/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<UpdateStatus>;
},
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}`);
}
Expand Down Expand Up @@ -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),
Expand All @@ -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" },
Expand All @@ -1994,7 +1994,7 @@ export const api = {
},
deleteGroup: async (name: string): Promise<void> => {
const response = await fetch(
`${getApiBase()}/groups/${encodeURIComponent(name)}`,
`${getApiBase()}/links/groups/${encodeURIComponent(name)}`,
{ method: "DELETE" },
);
if (!response.ok) {
Expand All @@ -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),
Expand All @@ -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" },
Expand All @@ -2031,7 +2031,7 @@ export const api = {
},
deleteHuman: async (id: string): Promise<void> => {
const response = await fetch(
`${getApiBase()}/humans/${encodeURIComponent(id)}`,
`${getApiBase()}/links/humans/${encodeURIComponent(id)}`,
{ method: "DELETE" },
);
if (!response.ok) {
Expand Down
2 changes: 1 addition & 1 deletion interface/src/components/PromptInspectModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export function PromptInspectModal({ open, onOpenChange, channelId }: PromptInsp

return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent className="!flex h-[85vh] max-w-5xl !flex-col !gap-0 overflow-hidden !p-0">
<DialogContent className="!flex h-[85vh] w-[80vw] max-w-[80vw] !flex-col !gap-0 overflow-hidden !p-0">
<DialogHeader className="flex-shrink-0 border-b border-app-line/50 px-6 pt-6 pb-4">
<DialogTitle>Prompt Inspector</DialogTitle>
{showContent && !contentLoading && systemPrompt != null && (
Expand Down
Loading