fix: scope useWorkspace to panel and add FLY_TOKEN env fallbacks

This commit is contained in:
nandi committed 2026-11-18 16:39:17 -08:00
1 parent b8f5b77931
commit d399919690
3 files changed
+33 -16

No files matched your search

+13 -5
View File
@@ -1,7 +1,8 @@
import type {
PluginClientContext,
PluginSidebarItemProps,
PluginWorkspacePanelProps,
import {
type PluginClientContext,
type PluginSidebarItemProps,
type PluginWorkspacePanelProps,
useWorkspace,
} from "@getpaseo/plugin/client";
import { SidebarRow } from "@getpaseo/plugin/client/ui";
import { FlySpritesSettingsScreen } from "./client/settings-screen";
@@ -18,7 +19,14 @@ function WorkersSidebarItem({ currentScreen, openScreen }: PluginSidebarItemProp
}
function WorkspaceWorkersPanel({ workspaceId, ...hostProps }: PluginWorkspacePanelProps) {
return <FlySpritesWorkersScreen {...hostProps} workspaceId={workspaceId} />;
const workspace = useWorkspace(workspaceId);
return (
<FlySpritesWorkersScreen
{...hostProps}
workspaceName={workspace?.name}
workspaceDirectory={workspace?.directory}
/>
);
}
export default function contribute(client: PluginClientContext) {