Skip to content

The open source coding agent.

TypeScript

wip: zen

Frankc9155c117a0f
diff --git a/packages/console/app/src/routes/workspace/[id]/index.tsx b/packages/console/app/src/routes/workspace/[id]/index.tsx
index a5a8bb46919..3716674a7ad 100644
--- a/packages/console/app/src/routes/workspace/[id]/index.tsx
+++ b/packages/console/app/src/routes/workspace/[id]/index.tsx
@@ -4,8 +4,14 @@ import { UsageSection } from "./usage-section"
import { ModelSection } from "./model-section"
import { ProviderSection } from "./provider-section"
import { IconLogo } from "~/component/icon"
+import { createAsync, useParams } from "@solidjs/router"
+import { querySessionInfo } from "../common"
+import { Show } from "solid-js"
export default function () {
+ const params = useParams()
+ const userInfo = createAsync(() => querySessionInfo(params.id))
+
return (
<div data-page="workspace-[id]">
<section data-component="title-section">
@@ -22,7 +28,9 @@ export default function () {
<div data-slot="sections">
<NewUserSection />
<ModelSection />
- <ProviderSection />
+ <Show when={userInfo()?.isAdmin}>
+ <ProviderSection />
+ </Show>
<UsageSection />
</div>
</div>