diff --git a/apps/web/src/components/start-tool-modal.tsx b/apps/web/src/components/start-tool-modal.tsx
index 2a9f159..fdf0805 100644
--- a/apps/web/src/components/start-tool-modal.tsx
+++ b/apps/web/src/components/start-tool-modal.tsx
@@ -76,9 +76,7 @@ export function StartToolModal({
{status === "loading" && (
Loading tools...
)}
- {loadError && (
- {loadError}
- )}
+ {loadError && {loadError}}
diff --git a/apps/web/src/pages/workspace-detail.tsx b/apps/web/src/pages/workspace-detail.tsx
index a40a95f..d83f487 100644
--- a/apps/web/src/pages/workspace-detail.tsx
+++ b/apps/web/src/pages/workspace-detail.tsx
@@ -8,7 +8,9 @@ import { useWorkspaceFiles } from "../hooks/use-workspace-files";
import { useWorkspaceGit } from "../hooks/use-workspace-git";
import { useWorkspaceInstances } from "../hooks/use-workspace-instances";
import { useMobileViewport } from "../hooks/use-mobile-viewport";
+import { StartToolModal } from "../components/start-tool-modal";
import type { FileEntry } from "../api/workspace-files";
+import type { Workspace } from "../types/workspace";
type Tab = "files" | "git" | "tools" | "settings";
@@ -40,7 +42,7 @@ export function WorkspaceDetailPage() {
{activeTab === "files" && }
{activeTab === "git" && }
- {activeTab === "tools" && }
+ {activeTab === "tools" && }
{activeTab === "settings" && }
{isMobile &&
}
@@ -309,8 +311,8 @@ function GitTab({ workspaceId }: { workspaceId: string }) {
/* ─── Tools Tab ─── */
-function ToolsTab({ workspaceId }: { workspaceId: string }) {
- const { instances, loading, create } = useWorkspaceInstances(workspaceId);
+function ToolsTab({ workspace }: { workspace: Workspace }) {
+ const { instances, loading, create } = useWorkspaceInstances(workspace.id);
const [showModal, setShowModal] = useState(false);
return (
@@ -360,9 +362,10 @@ function ToolsTab({ workspaceId }: { workspaceId: string }) {
)}
{showModal && (
setShowModal(false)}
- onStart={async (toolTypeId: string) => {
- await create(toolTypeId);
+ onStart={async (toolTypeId, configProfileId) => {
+ await create(toolTypeId, undefined, configProfileId);
setShowModal(false);
}}
/>
@@ -376,14 +379,7 @@ function ToolsTab({ workspaceId }: { workspaceId: string }) {
function SettingsTab({
workspace,
}: {
- workspace: {
- id: string;
- name: string;
- branch: string;
- path: string;
- status: string;
- created_at: string;
- };
+ workspace: Workspace;
}) {
return (
@@ -416,56 +412,4 @@ function SettingsTab({
);
}
-/* ─── Start Tool Modal ─── */
-function StartToolModal({
- onClose,
- onStart,
-}: {
- onClose: () => void;
- onStart: (toolTypeId: string) => Promise
;
-}) {
- const [toolTypeId, setToolTypeId] = useState("");
- const [submitting, setSubmitting] = useState(false);
-
- const handleSubmit = async (e: React.FormEvent) => {
- e.preventDefault();
- if (!toolTypeId) return;
- setSubmitting(true);
- try {
- await onStart(toolTypeId);
- } finally {
- setSubmitting(false);
- }
- };
-
- return (
-
-
e.stopPropagation()}>
-
Start Tool
-
-
-
- );
-}