Skip to content

Commit

Permalink
fix: Streamline run timeline fetching and rendering (#564)
Browse files Browse the repository at this point in the history
* refactor: streamline run timeline fetching and rendering

* fix: Minor changes 2025-01-13-12:21:32

* fix: Minor changes 2025-01-13-15:54:42

* fix: Minor changes 2025-01-13-15:54:42

* fix: Minor changes 2025-01-13-15:54:42

* fix: Minor changes 2025-01-14-12:11:19
  • Loading branch information
nadeesha authored Jan 14, 2025
1 parent 8cfa65f commit 4f301fb
Show file tree
Hide file tree
Showing 7 changed files with 258 additions and 273 deletions.
2 changes: 0 additions & 2 deletions app/app/clusters/[clusterId]/runs/[runId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use client";

import { Run } from "@/components/workflow";

function Page({
Expand Down
3 changes: 0 additions & 3 deletions app/app/clusters/[clusterId]/settings/details/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const formSchema = z.object({
description: z.string().default(""),
debug: z.boolean().default(false),
enableCustomAuth: z.boolean().default(false),
enableKnowledgebase: z.boolean().default(false),
handleCustomAuthFunction: z.string().default(""),
});

Expand All @@ -55,7 +54,6 @@ export default function DetailsPage({ params: { clusterId } }: { params: { clust
form.setValue("description", details.body.description ?? "");
form.setValue("debug", details.body.debug ?? false);
form.setValue("enableCustomAuth", details.body.enableCustomAuth ?? false);
form.setValue("enableKnowledgebase", details.body.enableKnowledgebase ?? false);
form.setValue("handleCustomAuthFunction", details.body.handleCustomAuthFunction ?? "");
} else {
createErrorToast(details, "Failed to fetch cluster details");
Expand All @@ -78,7 +76,6 @@ export default function DetailsPage({ params: { clusterId } }: { params: { clust
description: data.description,
debug: data.debug,
enableCustomAuth: data.enableCustomAuth,
enableKnowledgebase: data.enableKnowledgebase,
handleCustomAuthFunction: data.handleCustomAuthFunction,
},
});
Expand Down
8 changes: 8 additions & 0 deletions app/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ export const client = initClient(contract, {
baseUrl: getBaseUrl(),
baseHeaders: {},
});

export const clientWithAbortController = (signal: AbortSignal) => {
return initClient(contract, {
baseUrl: getBaseUrl(),
baseHeaders: {},
abortSignal: signal,
});
};
2 changes: 0 additions & 2 deletions app/client/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,6 @@ export const definition = {
debug: z.boolean(),
enableCustomAuth: z.boolean(),
handleCustomAuthFunction: z.string().nullable(),
enableKnowledgebase: z.boolean(),
lastPingAt: z.date().nullable(),
isDemo: z.boolean(),
machines: z.array(
z.object({
Expand Down
5 changes: 0 additions & 5 deletions app/components/breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ export async function ClusterBreadcrumbs({ clusterId }: ClusterBreadcrumbsProps)
<Link href={`/clusters/${clusterId}/agents`} className={linkStyles}>
<Bot className="h-4 w-4" /> Agents
</Link>
{clusterDetails.body.enableKnowledgebase && (
<Link href={`/clusters/${clusterId}/knowledge`} className={linkStyles}>
<BookOpen className="h-4 w-4" /> Knowledge
</Link>
)}
<Link href={`/clusters/${clusterId}/integrations`} className={linkStyles}>
<NetworkIcon className="h-4 w-4" /> Integrations
</Link>
Expand Down
2 changes: 1 addition & 1 deletion app/components/chat/function-call.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function FunctionCall({
<div className="rounded-lg border border-border/50 bg-background/50 p-4">
<div className="space-y-2">
<div className="flex flex-row items-center space-x-2">
<SheetTrigger>
<SheetTrigger asChild>
<Button
size="sm"
className={`${approvalRequested && !approved ? "opacity-50" : ""}
Expand Down
Loading

0 comments on commit 4f301fb

Please sign in to comment.