@polpo-ai/dashboard 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/(dashboard)/layout.tsx +6 -6
- package/app/(dashboard)/projects/[id]/agents/[name]/memory/view.tsx +3 -3
- package/app/(dashboard)/projects/[id]/agents/[name]/models-view.tsx +1 -1
- package/app/(dashboard)/projects/[id]/agents/[name]/page.tsx +3 -3
- package/app/(dashboard)/projects/[id]/agents/[name]/prompt/view.tsx +4 -4
- package/app/(dashboard)/projects/[id]/agents/[name]/skills/view.tsx +1 -1
- package/app/(dashboard)/projects/[id]/agents/[name]/tools/view.tsx +2 -2
- package/app/(dashboard)/projects/[id]/agents/[name]/vault/view.tsx +1 -1
- package/app/(dashboard)/projects/[id]/agents/page.tsx +2 -2
- package/app/(dashboard)/projects/[id]/agents/view.tsx +2 -2
- package/app/(dashboard)/projects/[id]/logs/page.tsx +2 -2
- package/app/(dashboard)/projects/[id]/logs/view.tsx +3 -3
- package/app/(dashboard)/projects/[id]/memory/page.tsx +2 -2
- package/app/(dashboard)/projects/[id]/memory/view.tsx +1 -1
- package/app/(dashboard)/projects/[id]/missions/[missionId]/page.tsx +2 -2
- package/app/(dashboard)/projects/[id]/missions/[missionId]/view.tsx +3 -3
- package/app/(dashboard)/projects/[id]/missions/page.tsx +2 -2
- package/app/(dashboard)/projects/[id]/missions/view.tsx +5 -5
- package/app/(dashboard)/projects/[id]/onboarding-checklist.tsx +3 -3
- package/app/(dashboard)/projects/[id]/page.tsx +3 -3
- package/app/(dashboard)/projects/[id]/playbooks/[name]/view.tsx +4 -4
- package/app/(dashboard)/projects/[id]/playbooks/view.tsx +2 -2
- package/app/(dashboard)/projects/[id]/schedules/page.tsx +2 -2
- package/app/(dashboard)/projects/[id]/schedules/view.tsx +2 -2
- package/app/(dashboard)/projects/[id]/sessions/[sessionId]/page.tsx +2 -2
- package/app/(dashboard)/projects/[id]/sessions/[sessionId]/view.tsx +1 -1
- package/app/(dashboard)/projects/[id]/sessions/page.tsx +2 -2
- package/app/(dashboard)/projects/[id]/sessions/view.tsx +5 -5
- package/app/(dashboard)/projects/[id]/settings/page.tsx +4 -4
- package/app/(dashboard)/projects/[id]/skills/[name]/page.tsx +2 -2
- package/app/(dashboard)/projects/[id]/skills/[name]/view.tsx +4 -4
- package/app/(dashboard)/projects/[id]/skills/page.tsx +2 -2
- package/app/(dashboard)/projects/[id]/skills/view.tsx +4 -4
- package/app/(dashboard)/projects/[id]/storage/view.tsx +1 -1
- package/app/(dashboard)/projects/[id]/tasks/[taskId]/activity/view.tsx +2 -2
- package/app/(dashboard)/projects/[id]/tasks/[taskId]/assessment/view.tsx +1 -1
- package/app/(dashboard)/projects/[id]/tasks/[taskId]/blueprint.ts +1 -1
- package/app/(dashboard)/projects/[id]/tasks/[taskId]/output/view.tsx +2 -2
- package/app/(dashboard)/projects/[id]/tasks/[taskId]/page.tsx +3 -3
- package/app/(dashboard)/projects/[id]/tasks/[taskId]/view.tsx +1 -1
- package/app/(dashboard)/projects/[id]/tasks/page.tsx +2 -2
- package/app/(dashboard)/projects/[id]/tasks/view.tsx +5 -5
- package/app/(dashboard)/projects/[id]/view.tsx +4 -4
- package/app/(dashboard)/projects/[id]/welcome-banner.tsx +2 -2
- package/app/(dashboard)/projects/projects-list.tsx +1 -1
- package/app/(playground)/layout.tsx +2 -2
- package/app/(playground)/projects/[id]/playground/page.tsx +2 -2
- package/app/(playground)/projects/[id]/playground/view.tsx +2 -2
- package/app/(playground)/projects/[id]/playground-legacy/page.tsx +2 -2
- package/app/(playground)/projects/[id]/playground-legacy/skeleton.tsx +1 -1
- package/app/(playground)/projects/[id]/playground-legacy/view.tsx +1 -1
- package/components/ai-elements/code-block.tsx +3 -3
- package/components/dashboard/agent-picker-card.tsx +1 -1
- package/components/dashboard/agent-studio.tsx +10 -10
- package/components/dashboard/builder-chat.tsx +2 -2
- package/components/dashboard/client-picker.tsx +2 -2
- package/components/dashboard/connect-dialog.tsx +8 -8
- package/components/dashboard/file-browser.tsx +1 -1
- package/components/dashboard/markdown.tsx +1 -1
- package/components/dashboard/mcp-install-panel.tsx +2 -2
- package/components/dashboard/polpo-chat.tsx +2 -2
- package/components/dashboard/project-copilot.tsx +3 -3
- package/components/dashboard/sdk-snippet-panel.tsx +4 -4
- package/components/dashboard/settings-form.tsx +9 -9
- package/components/dashboard/sidebar.tsx +6 -6
- package/components/dashboard/skeletons.tsx +1 -1
- package/components/dashboard/skills-install-wizard.tsx +33 -12
- package/components/dashboard/task-studio.tsx +7 -7
- package/components/dashboard/top-header.tsx +2 -2
- package/components/dashboard/webhook-deliveries.tsx +1 -1
- package/components/providers.tsx +1 -1
- package/components/ui/badge.tsx +1 -1
- package/components/ui/button.tsx +1 -1
- package/components/ui/card.tsx +1 -1
- package/components/ui/chart.tsx +1 -1
- package/components/ui/command.tsx +3 -3
- package/components/ui/dialog.tsx +2 -2
- package/components/ui/input-group.tsx +4 -4
- package/components/ui/input.tsx +1 -1
- package/components/ui/multi-select.tsx +2 -2
- package/components/ui/popover.tsx +1 -1
- package/components/ui/select.tsx +1 -1
- package/components/ui/separator.tsx +1 -1
- package/components/ui/sheet.tsx +2 -2
- package/components/ui/skeleton.tsx +1 -1
- package/components/ui/tabs.tsx +1 -1
- package/components/ui/textarea.tsx +1 -1
- package/components/ui/tooltip.tsx +1 -1
- package/index.ts +3 -0
- package/package.json +3 -12
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import Link from "next/link";
|
|
5
5
|
import { LayoutGrid, List } from "lucide-react";
|
|
6
|
-
import type { Project } from "
|
|
6
|
+
import type { Project } from "../../../lib/api";
|
|
7
7
|
|
|
8
8
|
function timeAgo(date: string) {
|
|
9
9
|
const diff = Date.now() - new Date(date).getTime();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { redirect } from "next/navigation";
|
|
2
|
-
import { Providers } from "
|
|
3
|
-
import { getOrgs } from "
|
|
2
|
+
import { Providers } from "../../components/providers";
|
|
3
|
+
import { getOrgs } from "../../lib/api";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Isolated layout for the Playground tab. No project sidebar — this is a
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Suspense } from "react";
|
|
2
|
-
import { api, dataApi } from "
|
|
3
|
-
import type { Project } from "
|
|
2
|
+
import { api, dataApi } from "../../../../../lib/api";
|
|
3
|
+
import type { Project } from "../../../../../lib/api";
|
|
4
4
|
import type { AgentConfig } from "@polpo-ai/core";
|
|
5
5
|
import PlaygroundView from "./view";
|
|
6
6
|
import { PlaygroundSkeleton } from "../playground-legacy/skeleton";
|
|
@@ -15,8 +15,8 @@ import Link from "next/link";
|
|
|
15
15
|
import Image from "next/image";
|
|
16
16
|
import type { AgentConfig } from "@polpo-ai/core";
|
|
17
17
|
import { ArrowLeft, FolderOpen, Plus } from "lucide-react";
|
|
18
|
-
import { AgentModelSelector } from "
|
|
19
|
-
import { PolpoChat } from "
|
|
18
|
+
import { AgentModelSelector } from "../../../../../components/dashboard/agent-model-selector";
|
|
19
|
+
import { PolpoChat } from "../../../../../components/dashboard/polpo-chat";
|
|
20
20
|
|
|
21
21
|
interface Props {
|
|
22
22
|
projectId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Suspense } from "react";
|
|
2
|
-
import { api, dataApi } from "
|
|
3
|
-
import type { Project } from "
|
|
2
|
+
import { api, dataApi } from "../../../../../lib/api";
|
|
3
|
+
import type { Project } from "../../../../../lib/api";
|
|
4
4
|
import type { AgentConfig } from "@polpo-ai/core";
|
|
5
5
|
import PlaygroundView from "./view";
|
|
6
6
|
import { PlaygroundSkeleton } from "./skeleton";
|
|
@@ -8,7 +8,7 @@ import { PolpoProvider } from "@polpo-ai/react";
|
|
|
8
8
|
import { Chat } from "@polpo-ai/chat";
|
|
9
9
|
import type { AgentConfig } from "@polpo-ai/core";
|
|
10
10
|
import { ArrowLeft, Plus } from "lucide-react";
|
|
11
|
-
import { AgentModelSelector } from "
|
|
11
|
+
import { AgentModelSelector } from "../../../../../components/dashboard/agent-model-selector";
|
|
12
12
|
|
|
13
13
|
interface Props {
|
|
14
14
|
projectId: string;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { Button } from "
|
|
3
|
+
import { Button } from "../../components/ui/button";
|
|
4
4
|
import {
|
|
5
5
|
Select,
|
|
6
6
|
SelectContent,
|
|
7
7
|
SelectItem,
|
|
8
8
|
SelectTrigger,
|
|
9
9
|
SelectValue,
|
|
10
|
-
} from "
|
|
11
|
-
import { cn } from "
|
|
10
|
+
} from "../../components/ui/select";
|
|
11
|
+
import { cn } from "../../lib/utils";
|
|
12
12
|
import { CheckIcon, CopyIcon } from "lucide-react";
|
|
13
13
|
import type { ComponentProps, CSSProperties, HTMLAttributes } from "react";
|
|
14
14
|
import {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "
|
|
3
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../components/ui/select";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Agent picker styled as a card: pill label + select dropdown.
|
|
@@ -28,16 +28,16 @@ import {
|
|
|
28
28
|
type LucideIcon,
|
|
29
29
|
} from "lucide-react";
|
|
30
30
|
import type { AgentConfig } from "@polpo-ai/core";
|
|
31
|
-
import { BuilderChat } from "
|
|
32
|
-
import { AgentIdentityHeader } from "
|
|
33
|
-
import { Breadcrumb } from "
|
|
34
|
-
import { useCopilot } from "
|
|
35
|
-
import AgentModelsView from "
|
|
36
|
-
import AgentSkillsView from "
|
|
37
|
-
import AgentToolsView from "
|
|
38
|
-
import AgentPromptView from "
|
|
39
|
-
import AgentMemoryView from "
|
|
40
|
-
import AgentVaultView from "
|
|
31
|
+
import { BuilderChat } from "../../components/dashboard/builder-chat";
|
|
32
|
+
import { AgentIdentityHeader } from "../../components/dashboard/agent-identity-header";
|
|
33
|
+
import { Breadcrumb } from "../../components/dashboard/breadcrumb";
|
|
34
|
+
import { useCopilot } from "../../components/dashboard/project-copilot";
|
|
35
|
+
import AgentModelsView from "../../app/(dashboard)/projects/[id]/agents/[name]/models-view";
|
|
36
|
+
import AgentSkillsView from "../../app/(dashboard)/projects/[id]/agents/[name]/skills/view";
|
|
37
|
+
import AgentToolsView from "../../app/(dashboard)/projects/[id]/agents/[name]/tools/view";
|
|
38
|
+
import AgentPromptView from "../../app/(dashboard)/projects/[id]/agents/[name]/prompt/view";
|
|
39
|
+
import AgentMemoryView from "../../app/(dashboard)/projects/[id]/agents/[name]/memory/view";
|
|
40
|
+
import AgentVaultView from "../../app/(dashboard)/projects/[id]/agents/[name]/vault/view";
|
|
41
41
|
|
|
42
42
|
export interface VaultEntry {
|
|
43
43
|
service: string;
|
|
@@ -29,8 +29,8 @@ import {
|
|
|
29
29
|
type PendingToolCall,
|
|
30
30
|
} from "@lumea-labs/chat";
|
|
31
31
|
import type { ToolCallEvent } from "@lumea-labs/tool-calls";
|
|
32
|
-
import { ChatShell } from "
|
|
33
|
-
import type { BuilderContext, NavigateTarget } from "
|
|
32
|
+
import { ChatShell } from "../../components/dashboard/chat-shell";
|
|
33
|
+
import type { BuilderContext, NavigateTarget } from "../../lib/builder-context";
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* A tool-call mutated project data → trigger a refresh. The builder's data
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { MultiSelect } from "
|
|
3
|
+
import { MultiSelect } from "../../components/ui/multi-select";
|
|
4
4
|
import {
|
|
5
5
|
ClaudeCodeIcon,
|
|
6
6
|
ClineIcon,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
RooIcon,
|
|
13
13
|
TraeIcon,
|
|
14
14
|
WindsurfIcon,
|
|
15
|
-
} from "
|
|
15
|
+
} from "../../components/icons/coding-agents";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Coding agent client definitions — shared across ConnectDialog and
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
4
|
import { usePathname } from "next/navigation";
|
|
5
5
|
import { useQuery } from "@tanstack/react-query";
|
|
6
|
-
import { fetchControlPlane } from "
|
|
6
|
+
import { fetchControlPlane } from "../../lib/data-client";
|
|
7
7
|
import { Plug, KeyRound, Terminal, CodeXml, SquareTerminal } from "lucide-react";
|
|
8
|
-
import { CopyCard } from "
|
|
9
|
-
import { ClientPicker } from "
|
|
10
|
-
import { SdkSnippetPanel } from "
|
|
11
|
-
import { McpInstallPanel } from "
|
|
8
|
+
import { CopyCard } from "../../components/dashboard/copy-card";
|
|
9
|
+
import { ClientPicker } from "../../components/dashboard/client-picker";
|
|
10
|
+
import { SdkSnippetPanel } from "../../components/dashboard/sdk-snippet-panel";
|
|
11
|
+
import { McpInstallPanel } from "../../components/dashboard/mcp-install-panel";
|
|
12
12
|
import {
|
|
13
13
|
Dialog,
|
|
14
14
|
DialogContent,
|
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
DialogDescription,
|
|
18
18
|
DialogFooter,
|
|
19
19
|
DialogClose,
|
|
20
|
-
} from "
|
|
21
|
-
import type { Project } from "
|
|
22
|
-
import { createPolpoClient } from "
|
|
20
|
+
} from "../../components/ui/dialog";
|
|
21
|
+
import type { Project } from "../../lib/api";
|
|
22
|
+
import { createPolpoClient } from "../../lib/polpo-client";
|
|
23
23
|
|
|
24
24
|
const API_URL = process.env.NEXT_PUBLIC_API_URL ?? "https://api.polpo.sh";
|
|
25
25
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useState, useCallback } from "react";
|
|
4
4
|
import { useQuery } from "@tanstack/react-query";
|
|
5
|
-
import { usePolpoClient } from "
|
|
5
|
+
import { usePolpoClient } from "../../lib/polpo-client";
|
|
6
6
|
import {
|
|
7
7
|
Folder, FileText, File, Image, Music, Video, Archive,
|
|
8
8
|
ChevronRight, ChevronLeft, Download,
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import { useMemo, useState } from "react";
|
|
4
4
|
import { ExternalLink } from "lucide-react";
|
|
5
|
-
import { CopyCard } from "
|
|
5
|
+
import { CopyCard } from "../../components/dashboard/copy-card";
|
|
6
6
|
import {
|
|
7
7
|
ClaudeCodeIcon,
|
|
8
8
|
CursorIcon,
|
|
9
9
|
WindsurfIcon,
|
|
10
|
-
} from "
|
|
10
|
+
} from "../../components/icons/coding-agents";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* MCP install panel — rendered inside the Connect dialog's "Coding Agent"
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
type AskUserQuestion,
|
|
45
45
|
type PromptInputMessage,
|
|
46
46
|
} from "@lumea-labs/chat";
|
|
47
|
-
import { ChatShell } from "
|
|
47
|
+
import { ChatShell } from "../../components/dashboard/chat-shell";
|
|
48
48
|
import {
|
|
49
49
|
FileManagerProvider,
|
|
50
50
|
FileList,
|
|
@@ -63,7 +63,7 @@ import { audioHandler } from "@lumea-labs/file-manager-polpo/handlers/audio-hand
|
|
|
63
63
|
import { videoHandler } from "@lumea-labs/file-manager-polpo/handlers/video-handler";
|
|
64
64
|
import { NextIntlClientProvider } from "next-intl";
|
|
65
65
|
import { ArrowUp, Paperclip, Square, X } from "lucide-react";
|
|
66
|
-
import { Sheet, SheetContent, SheetTitle } from "
|
|
66
|
+
import { Sheet, SheetContent, SheetTitle } from "../../components/ui/sheet";
|
|
67
67
|
|
|
68
68
|
/* ------------------------------------------------------------------ */
|
|
69
69
|
/* PolpoChat — high-level wrapper (providers + session lifecycle) */
|
|
@@ -30,9 +30,9 @@ import {
|
|
|
30
30
|
import { useRouter } from "next/navigation";
|
|
31
31
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
32
32
|
import { SquarePen, X } from "lucide-react";
|
|
33
|
-
import { BuilderChat } from "
|
|
34
|
-
import { useBuilderContext, type NavigateTarget } from "
|
|
35
|
-
import { fetchControlPlane } from "
|
|
33
|
+
import { BuilderChat } from "../../components/dashboard/builder-chat";
|
|
34
|
+
import { useBuilderContext, type NavigateTarget } from "../../lib/builder-context";
|
|
35
|
+
import { fetchControlPlane } from "../../lib/data-client";
|
|
36
36
|
|
|
37
37
|
const API_URL = process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:4000";
|
|
38
38
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { useCallback, useMemo, useState } from "react";
|
|
4
|
-
import { CopyCard } from "
|
|
5
|
-
import { AgentPickerCard } from "
|
|
6
|
-
import { TabToggle } from "
|
|
7
|
-
import { AgentModelSelector } from "
|
|
4
|
+
import { CopyCard } from "../../components/dashboard/copy-card";
|
|
5
|
+
import { AgentPickerCard } from "../../components/dashboard/agent-picker-card";
|
|
6
|
+
import { TabToggle } from "../../components/dashboard/tab-toggle";
|
|
7
|
+
import { AgentModelSelector } from "../../components/dashboard/agent-model-selector";
|
|
8
8
|
import { PolpoProvider } from "@polpo-ai/react";
|
|
9
9
|
import { Chat } from "@polpo-ai/chat";
|
|
10
10
|
import type { AgentConfig } from "@polpo-ai/core";
|
|
@@ -22,9 +22,9 @@ import {
|
|
|
22
22
|
Pencil,
|
|
23
23
|
Eye,
|
|
24
24
|
} from "lucide-react";
|
|
25
|
-
import { fetchDataPlane, mutateDataPlane } from "
|
|
26
|
-
import { fetchControlPlane } from "
|
|
27
|
-
import type { ProjectSettings, ProjectGatewaySettings } from "
|
|
25
|
+
import { fetchDataPlane, mutateDataPlane } from "../../lib/data-client";
|
|
26
|
+
import { fetchControlPlane } from "../../lib/data-client";
|
|
27
|
+
import type { ProjectSettings, ProjectGatewaySettings } from "../../lib/api";
|
|
28
28
|
import {
|
|
29
29
|
Dialog,
|
|
30
30
|
DialogContent,
|
|
@@ -33,12 +33,12 @@ import {
|
|
|
33
33
|
DialogDescription,
|
|
34
34
|
DialogFooter,
|
|
35
35
|
DialogClose,
|
|
36
|
-
} from "
|
|
37
|
-
import { CopyCard } from "
|
|
38
|
-
import { useEventCatalog } from "
|
|
39
|
-
import { WebhookDeliveries } from "
|
|
40
|
-
import { InferenceModeRadio, type InferenceMode } from "
|
|
41
|
-
import type { ByokEntry } from "
|
|
36
|
+
} from "../../components/ui/dialog";
|
|
37
|
+
import { CopyCard } from "../../components/dashboard/copy-card";
|
|
38
|
+
import { useEventCatalog } from "../../lib/use-event-catalog";
|
|
39
|
+
import { WebhookDeliveries } from "../../components/dashboard/webhook-deliveries";
|
|
40
|
+
import { InferenceModeRadio, type InferenceMode } from "../../components/dashboard/inference-mode";
|
|
41
|
+
import type { ByokEntry } from "../../lib/api";
|
|
42
42
|
|
|
43
43
|
const SALES_EMAIL = "hello@polpo.sh";
|
|
44
44
|
|
|
@@ -13,15 +13,15 @@ import {
|
|
|
13
13
|
} from "lucide-react";
|
|
14
14
|
import {
|
|
15
15
|
Sheet, SheetContent, SheetTitle,
|
|
16
|
-
} from "
|
|
16
|
+
} from "../../components/ui/sheet";
|
|
17
17
|
import {
|
|
18
18
|
Tooltip, TooltipTrigger, TooltipContent,
|
|
19
|
-
} from "
|
|
20
|
-
import { useMobileSidebar } from "
|
|
21
|
-
import { useDesktopSidebar } from "
|
|
19
|
+
} from "../../components/ui/tooltip";
|
|
20
|
+
import { useMobileSidebar } from "../../hooks/use-mobile-sidebar";
|
|
21
|
+
import { useDesktopSidebar } from "../../hooks/use-desktop-sidebar";
|
|
22
22
|
import { useQuery } from "@tanstack/react-query";
|
|
23
|
-
import { fetchControlPlane } from "
|
|
24
|
-
import { ProjectSwitcher } from "
|
|
23
|
+
import { fetchControlPlane } from "../../lib/data-client";
|
|
24
|
+
import { ProjectSwitcher } from "../../components/dashboard/top-header";
|
|
25
25
|
|
|
26
26
|
const globalNav = [
|
|
27
27
|
{ label: "Projects", href: "/projects", icon: Boxes },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { useState } from "react";
|
|
3
|
+
import { useMemo, useState } from "react";
|
|
4
4
|
import { useParams } from "next/navigation";
|
|
5
5
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
6
6
|
import {
|
|
@@ -13,9 +13,14 @@ import {
|
|
|
13
13
|
Loader2,
|
|
14
14
|
Search,
|
|
15
15
|
} from "lucide-react";
|
|
16
|
-
import { usePolpoClient } from "
|
|
17
|
-
import {
|
|
18
|
-
|
|
16
|
+
import { usePolpoClient } from "../../lib/polpo-client";
|
|
17
|
+
import {
|
|
18
|
+
SkillsProvider,
|
|
19
|
+
SkillCreateForm,
|
|
20
|
+
type SkillsAdapter,
|
|
21
|
+
type SkillCreateInput,
|
|
22
|
+
type Skill,
|
|
23
|
+
} from "@lumea-labs/skills";
|
|
19
24
|
import {
|
|
20
25
|
Dialog,
|
|
21
26
|
DialogContent,
|
|
@@ -23,7 +28,7 @@ import {
|
|
|
23
28
|
DialogHeader,
|
|
24
29
|
DialogTitle,
|
|
25
30
|
DialogTrigger,
|
|
26
|
-
} from "
|
|
31
|
+
} from "../../components/ui/dialog";
|
|
27
32
|
|
|
28
33
|
/**
|
|
29
34
|
* SkillsInstallWizard — replaces the old read-only "how to install" dialog
|
|
@@ -63,12 +68,7 @@ function sourceFor(s: RegistrySkill): string {
|
|
|
63
68
|
}
|
|
64
69
|
|
|
65
70
|
export function SkillsInstallWizard() {
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<SkillsProvider adapter={adapter}>
|
|
69
|
-
<WizardDialog />
|
|
70
|
-
</SkillsProvider>
|
|
71
|
-
);
|
|
71
|
+
return <WizardDialog />;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
function WizardDialog() {
|
|
@@ -76,6 +76,25 @@ function WizardDialog() {
|
|
|
76
76
|
const client = usePolpoClient(id);
|
|
77
77
|
const qc = useQueryClient();
|
|
78
78
|
|
|
79
|
+
// Minimal SkillsAdapter built directly on the PolpoClient (the same seam
|
|
80
|
+
// usePolpoClient resolves: OSS direct, cloud session-proxy). Avoids
|
|
81
|
+
// @polpo-ai/react's <PolpoProvider>. Only createSkill is needed here —
|
|
82
|
+
// registry/URL installs go through client.installSkills directly.
|
|
83
|
+
const adapter = useMemo<SkillsAdapter>(
|
|
84
|
+
() => ({
|
|
85
|
+
createSkill: async (input: SkillCreateInput): Promise<Skill> => {
|
|
86
|
+
const res = await client.createSkill({
|
|
87
|
+
name: input.name,
|
|
88
|
+
description: input.description,
|
|
89
|
+
content: input.body,
|
|
90
|
+
allowedTools: (input.frontmatter as { allowedTools?: string[] })?.allowedTools,
|
|
91
|
+
});
|
|
92
|
+
return { id: res.name, name: res.name, description: input.description, installed: true } as Skill;
|
|
93
|
+
},
|
|
94
|
+
}),
|
|
95
|
+
[client],
|
|
96
|
+
);
|
|
97
|
+
|
|
79
98
|
const [open, setOpen] = useState(false);
|
|
80
99
|
const [source, setSource] = useState<Source | null>(null);
|
|
81
100
|
const [search, setSearch] = useState("");
|
|
@@ -244,7 +263,9 @@ function WizardDialog() {
|
|
|
244
263
|
|
|
245
264
|
{/* ── Paste / create (dogfood lumea-agents UI) ──── */}
|
|
246
265
|
{source === "paste" && (
|
|
247
|
-
<
|
|
266
|
+
<SkillsProvider adapter={adapter}>
|
|
267
|
+
<SkillCreateForm onCreated={afterCreate} onCancel={() => setSource(null)} />
|
|
268
|
+
</SkillsProvider>
|
|
248
269
|
)}
|
|
249
270
|
|
|
250
271
|
{install.isError && source === "registry" && (
|
|
@@ -26,15 +26,15 @@ import {
|
|
|
26
26
|
} from "lucide-react";
|
|
27
27
|
import { useQuery } from "@tanstack/react-query";
|
|
28
28
|
import type { Task } from "@polpo-ai/core";
|
|
29
|
-
import { usePolpoClient } from "
|
|
30
|
-
import { Breadcrumb } from "
|
|
31
|
-
import type { BlueprintContext } from "
|
|
32
|
-
import TaskOverviewView from "
|
|
33
|
-
import TaskOutputView from "
|
|
34
|
-
import TaskAssessmentView from "
|
|
29
|
+
import { usePolpoClient } from "../../lib/polpo-client";
|
|
30
|
+
import { Breadcrumb } from "../../components/dashboard/breadcrumb";
|
|
31
|
+
import type { BlueprintContext } from "../../app/(dashboard)/projects/[id]/tasks/[taskId]/blueprint";
|
|
32
|
+
import TaskOverviewView from "../../app/(dashboard)/projects/[id]/tasks/[taskId]/view";
|
|
33
|
+
import TaskOutputView from "../../app/(dashboard)/projects/[id]/tasks/[taskId]/output/view";
|
|
34
|
+
import TaskAssessmentView from "../../app/(dashboard)/projects/[id]/tasks/[taskId]/assessment/view";
|
|
35
35
|
import TaskActivityView, {
|
|
36
36
|
type TaskActivityPayload,
|
|
37
|
-
} from "
|
|
37
|
+
} from "../../app/(dashboard)/projects/[id]/tasks/[taskId]/activity/view";
|
|
38
38
|
|
|
39
39
|
const statusColor: Record<string, string> = {
|
|
40
40
|
done: "bg-brand",
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
SquarePen,
|
|
14
14
|
Settings,
|
|
15
15
|
} from "lucide-react";
|
|
16
|
-
import { ConnectButton } from "
|
|
17
|
-
import { Popover, PopoverContent, PopoverTrigger } from "
|
|
16
|
+
import { ConnectButton } from "../../components/dashboard/connect-dialog";
|
|
17
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../components/ui/popover";
|
|
18
18
|
|
|
19
19
|
const API_URL = process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:4000";
|
|
20
20
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import { useState } from "react";
|
|
16
16
|
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
|
17
17
|
import { ChevronDown, ChevronRight, Loader2, RefreshCw } from "lucide-react";
|
|
18
|
-
import { fetchDataPlane, mutateDataPlane } from "
|
|
18
|
+
import { fetchDataPlane, mutateDataPlane } from "../../lib/data-client";
|
|
19
19
|
|
|
20
20
|
interface Webhook {
|
|
21
21
|
id: string;
|
package/components/providers.tsx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
4
4
|
import { useState } from "react";
|
|
5
|
-
import { TooltipProvider } from "
|
|
5
|
+
import { TooltipProvider } from "../components/ui/tooltip";
|
|
6
6
|
|
|
7
7
|
export function Providers({ children }: { children: React.ReactNode }) {
|
|
8
8
|
const [queryClient] = useState(() => new QueryClient({
|
package/components/ui/badge.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { mergeProps } from "@base-ui/react/merge-props"
|
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render"
|
|
3
3
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
4
|
|
|
5
|
-
import { cn } from "
|
|
5
|
+
import { cn } from "../../lib/utils"
|
|
6
6
|
|
|
7
7
|
const badgeVariants = cva(
|
|
8
8
|
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
|
package/components/ui/button.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { Button as ButtonPrimitive } from "@base-ui/react/button"
|
|
4
4
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
5
5
|
|
|
6
|
-
import { cn } from "
|
|
6
|
+
import { cn } from "../../lib/utils"
|
|
7
7
|
|
|
8
8
|
const buttonVariants = cva(
|
|
9
9
|
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
package/components/ui/card.tsx
CHANGED
package/components/ui/chart.tsx
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
import * as React from "react"
|
|
4
4
|
import { Command as CommandPrimitive } from "cmdk"
|
|
5
5
|
|
|
6
|
-
import { cn } from "
|
|
6
|
+
import { cn } from "../../lib/utils"
|
|
7
7
|
import {
|
|
8
8
|
Dialog,
|
|
9
9
|
DialogContent,
|
|
10
10
|
DialogDescription,
|
|
11
11
|
DialogHeader,
|
|
12
12
|
DialogTitle,
|
|
13
|
-
} from "
|
|
13
|
+
} from "../../components/ui/dialog"
|
|
14
14
|
import {
|
|
15
15
|
InputGroup,
|
|
16
16
|
InputGroupAddon,
|
|
17
|
-
} from "
|
|
17
|
+
} from "../../components/ui/input-group"
|
|
18
18
|
import { SearchIcon, CheckIcon } from "lucide-react"
|
|
19
19
|
|
|
20
20
|
function Command({
|
package/components/ui/dialog.tsx
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import * as React from "react"
|
|
4
4
|
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog"
|
|
5
5
|
|
|
6
|
-
import { cn } from "
|
|
7
|
-
import { Button } from "
|
|
6
|
+
import { cn } from "../../lib/utils"
|
|
7
|
+
import { Button } from "../../components/ui/button"
|
|
8
8
|
import { XIcon } from "lucide-react"
|
|
9
9
|
|
|
10
10
|
function Dialog({ ...props }: DialogPrimitive.Root.Props) {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import * as React from "react"
|
|
4
4
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
5
5
|
|
|
6
|
-
import { cn } from "
|
|
7
|
-
import { Button } from "
|
|
8
|
-
import { Input } from "
|
|
9
|
-
import { Textarea } from "
|
|
6
|
+
import { cn } from "../../lib/utils"
|
|
7
|
+
import { Button } from "../../components/ui/button"
|
|
8
|
+
import { Input } from "../../components/ui/input"
|
|
9
|
+
import { Textarea } from "../../components/ui/textarea"
|
|
10
10
|
|
|
11
11
|
function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
12
12
|
return (
|
package/components/ui/input.tsx
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import type { ReactNode } from "react";
|
|
4
4
|
import { Check, ChevronDown } from "lucide-react";
|
|
5
|
-
import { Popover, PopoverContent, PopoverTrigger } from "
|
|
6
|
-
import { cn } from "
|
|
5
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../components/ui/popover";
|
|
6
|
+
import { cn } from "../../lib/utils";
|
|
7
7
|
|
|
8
8
|
export interface MultiSelectOption {
|
|
9
9
|
value: string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from "react"
|
|
4
4
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover"
|
|
5
5
|
|
|
6
|
-
import { cn } from "
|
|
6
|
+
import { cn } from "../../lib/utils"
|
|
7
7
|
|
|
8
8
|
function Popover({ ...props }: PopoverPrimitive.Root.Props) {
|
|
9
9
|
return <PopoverPrimitive.Root data-slot="popover" {...props} />
|
package/components/ui/select.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from "react"
|
|
4
4
|
import { Select as SelectPrimitive } from "@base-ui/react/select"
|
|
5
5
|
|
|
6
|
-
import { cn } from "
|
|
6
|
+
import { cn } from "../../lib/utils"
|
|
7
7
|
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react"
|
|
8
8
|
|
|
9
9
|
const Select = SelectPrimitive.Root
|