@agent-native/core 0.114.5 → 0.114.7
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/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +14 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/cli/mcp-config-writers.ts +6 -4
- package/corpus/core/src/cli/mcp.ts +124 -0
- package/corpus/core/src/cli/skills-content/help.ts +4 -3
- package/corpus/core/src/cli/skills-content/index.ts +1 -0
- package/corpus/core/src/cli/skills-content/rewind-skill.ts +52 -0
- package/corpus/core/src/cli/skills.ts +115 -13
- package/corpus/core/src/client/resources/ResourceTree.tsx +11 -5
- package/corpus/core/src/client/resources/ResourcesPanel.tsx +141 -18
- package/corpus/core/src/mcp/screen-memory-stdio.ts +1360 -104
- package/corpus/core/src/mcp-client/index.ts +9 -0
- package/corpus/core/src/mcp-client/screen-memory-local.ts +847 -13
- package/corpus/templates/clips/actions/apply-rewind-extension.ts +195 -0
- package/corpus/templates/clips/actions/delete-agent-recording-if-unpromoted.ts +64 -0
- package/corpus/templates/clips/actions/get-rewind-extension-request.ts +22 -0
- package/corpus/templates/clips/actions/get-screen-memory-status.ts +18 -2
- package/corpus/templates/clips/actions/list-rewind-extension-requests.ts +52 -0
- package/corpus/templates/clips/actions/make-recording-private-for-rewind.ts +55 -0
- package/corpus/templates/clips/actions/query-screen-memory-context.ts +4 -4
- package/corpus/templates/clips/actions/request-rewind-extension.ts +81 -0
- package/corpus/templates/clips/actions/update-rewind-extension-request.ts +47 -0
- package/corpus/templates/clips/app/components/editor/editor-layout.tsx +25 -0
- package/corpus/templates/clips/app/components/editor/editor-toolbar.tsx +36 -0
- package/corpus/templates/clips/app/components/editor/rewind-extension-dialog.tsx +338 -0
- package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +1 -16
- package/corpus/templates/clips/app/components/editor/timeline.tsx +26 -0
- package/corpus/templates/clips/app/components/meetings/meeting-card.tsx +1 -2
- package/corpus/templates/clips/app/i18n/en-US.ts +18 -0
- package/corpus/templates/clips/app/lib/ffmpeg-export.ts +19 -12
- package/corpus/templates/clips/app/lib/rewind-visibility.ts +31 -0
- package/corpus/templates/clips/app/lib/timestamp-mapping.ts +7 -0
- package/corpus/templates/clips/app/lib/upload-file-client.ts +17 -0
- package/corpus/templates/clips/changelog/2026-07-14-rewind-keeps-recent-screen-context-local-and-turns-it-into-clips.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-active-clips-keep-rewind-stable-and-settings-clear.md +12 -0
- package/corpus/templates/clips/changelog/2026-07-17-clicking-the-clips-icon-during-a-recording-now-opens-the-app.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-default-mic-now-uses-the-mac-default-and-transcription-shares-one-capture.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-full-screen-clips-finalize-even-when-screencapturekit-stop-hangs.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-normal-full-screen-clips-no-longer-stop-immediately-after-th.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-rewind-can-hand-one-bounded-private-clip-to-your-agent.md +12 -0
- package/corpus/templates/clips/changelog/2026-07-17-rewind-home-can-copy-a-local-agent-prompt.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-rewind-now-has-a-calm-home-status-focused-first-run-consent-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-rewind-settings-are-smaller-clearer-and-agent-first.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-the-full-clips-interface-stays-available-while-recording.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-18-rewind-organizes-recent-work-into-local-searchable-chapters.md +8 -0
- package/corpus/templates/clips/changelog/2026-07-18-searchable-rewind-chapters.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-19-rewind-backed-recordings-now-start-immediately-after-the-cou.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-20-opening-zoom-meeting-launches-native-app.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-20-rewind-can-set-up-your-local-agent-once-so-future-requests-w.md +6 -0
- package/corpus/templates/clips/desktop/package.json +1 -0
- package/corpus/templates/clips/desktop/scripts/sign-macos-local.ts +12 -1
- package/corpus/templates/clips/desktop/src/app.tsx +2478 -223
- package/corpus/templates/clips/desktop/src/components/ReadinessPanel.tsx +21 -1
- package/corpus/templates/clips/desktop/src/components/Switch.tsx +3 -0
- package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +156 -24
- package/corpus/templates/clips/desktop/src/lib/native-recording-warm.ts +6 -7
- package/corpus/templates/clips/desktop/src/lib/open-meeting-join-url.ts +22 -0
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +1763 -1160
- package/corpus/templates/clips/desktop/src/lib/rewind-agent-prompt.ts +9 -0
- package/corpus/templates/clips/desktop/src/lib/rewind-recording-start.ts +20 -0
- package/corpus/templates/clips/desktop/src/main.tsx +3 -0
- package/corpus/templates/clips/desktop/src/overlays/countdown.tsx +14 -14
- package/corpus/templates/clips/desktop/src/overlays/meeting-notification.tsx +2 -3
- package/corpus/templates/clips/desktop/src/overlays/onboarding.tsx +4 -4
- package/corpus/templates/clips/desktop/src/overlays/preparing.tsx +13 -0
- package/corpus/templates/clips/desktop/src/overlays/toolbar.tsx +27 -2
- package/corpus/templates/clips/desktop/src/shared/config.ts +16 -0
- package/corpus/templates/clips/desktop/src/styles.css +956 -134
- package/corpus/templates/clips/desktop/src-tauri/Cargo.toml +5 -0
- package/corpus/templates/clips/desktop/src-tauri/build.rs +69 -1
- package/corpus/templates/clips/desktop/src-tauri/src/accessibility.rs +386 -12
- package/corpus/templates/clips/desktop/src-tauri/src/capture_audio_bus.rs +382 -0
- package/corpus/templates/clips/desktop/src-tauri/src/capture_graph.rs +777 -0
- package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +249 -22
- package/corpus/templates/clips/desktop/src-tauri/src/config.rs +148 -1
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +58 -4
- package/corpus/templates/clips/desktop/src-tauri/src/logfile.rs +13 -1
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen/custom_capture.rs +1505 -51
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen/live_upload.rs +124 -0
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +1006 -95
- package/corpus/templates/clips/desktop/src-tauri/src/rewind_capture_suspension.rs +165 -0
- package/corpus/templates/clips/desktop/src-tauri/src/rewind_chapters.rs +2434 -0
- package/corpus/templates/clips/desktop/src-tauri/src/rewind_clip.rs +1650 -0
- package/corpus/templates/clips/desktop/src-tauri/src/rewind_egress.rs +643 -0
- package/corpus/templates/clips/desktop/src-tauri/src/rewind_local_ask.rs +803 -0
- package/corpus/templates/clips/desktop/src-tauri/src/rewind_meeting_history.rs +595 -0
- package/corpus/templates/clips/desktop/src-tauri/src/screen_memory.rs +2900 -91
- package/corpus/templates/clips/desktop/src-tauri/src/screen_memory_ocr.rs +360 -0
- package/corpus/templates/clips/desktop/src-tauri/src/screen_memory_transcript.rs +408 -0
- package/corpus/templates/clips/desktop/src-tauri/src/shortcuts.rs +114 -33
- package/corpus/templates/clips/desktop/src-tauri/src/state.rs +2 -2
- package/corpus/templates/clips/desktop/src-tauri/src/system_audio.rs +13 -3
- package/corpus/templates/clips/desktop/src-tauri/src/tray.rs +4 -1
- package/corpus/templates/clips/desktop/src-tauri/src/util.rs +7 -13
- package/corpus/templates/clips/desktop/src-tauri/src/whisper_speech.rs +198 -11
- package/corpus/templates/clips/desktop/src-tauri/tauri.alpha.conf.json +17 -0
- package/corpus/templates/clips/shared/meeting-join-url.ts +0 -5
- package/corpus/templates/content/.agents/skills/document-editing/SKILL.md +9 -1
- package/corpus/templates/content/AGENTS.md +4 -1
- package/corpus/templates/content/actions/_content-spaces.ts +6 -1
- package/corpus/templates/content/actions/_database-row-batch.ts +15 -2
- package/corpus/templates/content/actions/_database-utils.ts +83 -15
- package/corpus/templates/content/actions/add-database-item.ts +3 -0
- package/corpus/templates/content/actions/connect-local-folder-source.ts +2 -1
- package/corpus/templates/content/actions/delete-content-database.ts +12 -9
- package/corpus/templates/content/actions/delete-database-items.ts +3 -2
- package/corpus/templates/content/actions/delete-document.ts +233 -6
- package/corpus/templates/content/actions/duplicate-database-item.ts +1 -0
- package/corpus/templates/content/actions/get-document.ts +4 -1
- package/corpus/templates/content/actions/list-content-databases.ts +1 -0
- package/corpus/templates/content/actions/list-documents.ts +1 -0
- package/corpus/templates/content/actions/list-trashed-content-databases.ts +8 -2
- package/corpus/templates/content/actions/list-trashed-documents.ts +50 -0
- package/corpus/templates/content/actions/permanently-delete-document.ts +28 -0
- package/corpus/templates/content/actions/pull-document.ts +15 -2
- package/corpus/templates/content/actions/restore-content-database.ts +48 -11
- package/corpus/templates/content/actions/restore-document.ts +28 -0
- package/corpus/templates/content/actions/search-documents.ts +2 -1
- package/corpus/templates/content/actions/view-screen.ts +2 -1
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +149 -55
- package/corpus/templates/content/app/components/editor/database/GalleryView.tsx +7 -2
- package/corpus/templates/content/app/components/editor/database/ListView.tsx +7 -2
- package/corpus/templates/content/app/components/editor/database/TimelineView.tsx +3 -0
- package/corpus/templates/content/app/components/editor/database/sidebar.tsx +26 -5
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +243 -163
- package/corpus/templates/content/app/components/sidebar/WorkspaceSourceMenu.tsx +154 -0
- package/corpus/templates/content/app/components/sidebar/select-content-space.ts +11 -0
- package/corpus/templates/content/app/hooks/use-content-database.ts +6 -0
- package/corpus/templates/content/app/hooks/use-documents.ts +57 -0
- package/corpus/templates/content/app/i18n-data.ts +83 -2
- package/corpus/templates/content/app/routes/_app.local-files.tsx +8 -1
- package/corpus/templates/content/changelog/2026-07-19-pages-now-move-to-a-reversible-trash-and-the-organization-pi.md +6 -0
- package/corpus/templates/content/changelog/2026-07-20-trash-actions-now-preserve-independent-archived-pages-enforc.md +6 -0
- package/corpus/templates/content/changelog/2026-07-20-workspace-toggles-now-stay-independently-open-or-closed-and-.md +6 -0
- package/corpus/templates/content/changelog/2026-07-20-workspaces-can-be-added-from-a-blank-workspace-or-a-connecte.md +6 -0
- package/corpus/templates/content/parity/matrix.md +1 -1
- package/corpus/templates/content/parity/matrix.ts +3 -0
- package/corpus/templates/content/server/db/schema.ts +2 -0
- package/corpus/templates/content/server/lib/public-documents.ts +8 -2
- package/corpus/templates/content/server/plugins/db.ts +52 -0
- package/corpus/templates/content/server/routes/api/document-agent-context.json.get.ts +2 -2
- package/corpus/templates/content/shared/api.ts +10 -0
- package/corpus/toolkit/CHANGELOG.md +6 -0
- package/corpus/toolkit/package.json +1 -1
- package/corpus/toolkit/src/ui/progress.tsx +3 -2
- package/dist/cli/mcp-config-writers.d.ts +2 -2
- package/dist/cli/mcp-config-writers.d.ts.map +1 -1
- package/dist/cli/mcp-config-writers.js +6 -6
- package/dist/cli/mcp-config-writers.js.map +1 -1
- package/dist/cli/mcp.d.ts +14 -0
- package/dist/cli/mcp.d.ts.map +1 -1
- package/dist/cli/mcp.js +79 -0
- package/dist/cli/mcp.js.map +1 -1
- package/dist/cli/skills-content/help.d.ts +1 -1
- package/dist/cli/skills-content/help.d.ts.map +1 -1
- package/dist/cli/skills-content/help.js +4 -3
- package/dist/cli/skills-content/help.js.map +1 -1
- package/dist/cli/skills-content/index.d.ts +1 -0
- package/dist/cli/skills-content/index.d.ts.map +1 -1
- package/dist/cli/skills-content/index.js +1 -0
- package/dist/cli/skills-content/index.js.map +1 -1
- package/dist/cli/skills-content/rewind-skill.d.ts +2 -0
- package/dist/cli/skills-content/rewind-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/rewind-skill.js +53 -0
- package/dist/cli/skills-content/rewind-skill.js.map +1 -0
- package/dist/cli/skills.d.ts +6 -0
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +90 -14
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/resources/ResourceTree.d.ts +3 -1
- package/dist/client/resources/ResourceTree.d.ts.map +1 -1
- package/dist/client/resources/ResourceTree.js +4 -4
- package/dist/client/resources/ResourceTree.js.map +1 -1
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +55 -6
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/mcp/screen-memory-stdio.d.ts +365 -0
- package/dist/mcp/screen-memory-stdio.d.ts.map +1 -1
- package/dist/mcp/screen-memory-stdio.js +1014 -91
- package/dist/mcp/screen-memory-stdio.js.map +1 -1
- package/dist/mcp-client/index.d.ts +1 -1
- package/dist/mcp-client/index.d.ts.map +1 -1
- package/dist/mcp-client/index.js +1 -1
- package/dist/mcp-client/index.js.map +1 -1
- package/dist/mcp-client/screen-memory-local.d.ts +90 -0
- package/dist/mcp-client/screen-memory-local.d.ts.map +1 -1
- package/dist/mcp-client/screen-memory-local.js +590 -12
- package/dist/mcp-client/screen-memory-local.js.map +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +5 -5
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/provider-api.d.ts +4 -4
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/package.json +2 -2
- package/src/cli/mcp-config-writers.ts +6 -4
- package/src/cli/mcp.ts +124 -0
- package/src/cli/skills-content/help.ts +4 -3
- package/src/cli/skills-content/index.ts +1 -0
- package/src/cli/skills-content/rewind-skill.ts +52 -0
- package/src/cli/skills.ts +115 -13
- package/src/client/resources/ResourceTree.tsx +11 -5
- package/src/client/resources/ResourcesPanel.tsx +141 -18
- package/src/mcp/screen-memory-stdio.ts +1360 -104
- package/src/mcp-client/index.ts +9 -0
- package/src/mcp-client/screen-memory-local.ts +847 -13
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Button } from "@agent-native/toolkit/ui/button";
|
|
1
2
|
import {
|
|
2
3
|
IconPlus,
|
|
3
4
|
IconUpload,
|
|
@@ -82,6 +83,42 @@ import {
|
|
|
82
83
|
const WORKSPACE_DOCS_URL = "https://agent-native.com/docs/workspace";
|
|
83
84
|
const LOCAL_WORKSPACE_RESOURCE_METADATA_SOURCE = "local-workspace-resource";
|
|
84
85
|
|
|
86
|
+
const EMPTY_RESOURCE_ACTION_LABELS: Record<ResourceView, string> = {
|
|
87
|
+
files: "Add file",
|
|
88
|
+
instructions: "Add instructions",
|
|
89
|
+
agents: "Add agent",
|
|
90
|
+
memory: "Add memory",
|
|
91
|
+
skills: "Add skill",
|
|
92
|
+
learnings: "Add learning",
|
|
93
|
+
"remote-agents": "Add remote agent",
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const EMPTY_RESOURCE_SEEDS: Partial<
|
|
97
|
+
Record<ResourceView, { path: string; content: string; mimeType?: string }>
|
|
98
|
+
> = {
|
|
99
|
+
instructions: {
|
|
100
|
+
path: "AGENTS.md",
|
|
101
|
+
content: "# Agent Instructions\n\n",
|
|
102
|
+
mimeType: "text/markdown",
|
|
103
|
+
},
|
|
104
|
+
memory: {
|
|
105
|
+
path: "memory/MEMORY.md",
|
|
106
|
+
content: "# Memory\n\n",
|
|
107
|
+
mimeType: "text/markdown",
|
|
108
|
+
},
|
|
109
|
+
learnings: {
|
|
110
|
+
path: "LEARNINGS.md",
|
|
111
|
+
content: "# Learnings\n\n",
|
|
112
|
+
mimeType: "text/markdown",
|
|
113
|
+
},
|
|
114
|
+
"remote-agents": {
|
|
115
|
+
path: "remote-agents/new-agent.json",
|
|
116
|
+
content:
|
|
117
|
+
'{\n "id": "new-agent",\n "name": "New agent",\n "description": "",\n "url": "",\n "color": "#6B7280"\n}\n',
|
|
118
|
+
mimeType: "application/json",
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
|
|
85
122
|
export type ResourceView =
|
|
86
123
|
| "files"
|
|
87
124
|
| "instructions"
|
|
@@ -228,6 +265,9 @@ function CreateMenu({
|
|
|
228
265
|
onCreated,
|
|
229
266
|
showToast,
|
|
230
267
|
mcpIntegrations,
|
|
268
|
+
triggerVariant = "icon",
|
|
269
|
+
triggerLabel,
|
|
270
|
+
initialView = "menu",
|
|
231
271
|
}: {
|
|
232
272
|
scope: ResourceScope;
|
|
233
273
|
resourceFilter?: ResourceView;
|
|
@@ -257,6 +297,9 @@ function CreateMenu({
|
|
|
257
297
|
message: string,
|
|
258
298
|
opts?: { resourceId?: string; durationMs?: number },
|
|
259
299
|
) => void;
|
|
300
|
+
triggerVariant?: "icon" | "outline";
|
|
301
|
+
triggerLabel?: string;
|
|
302
|
+
initialView?: CreateMenuView;
|
|
260
303
|
}) {
|
|
261
304
|
const t = useT();
|
|
262
305
|
const [open, setOpen] = useState(false);
|
|
@@ -313,7 +356,7 @@ function CreateMenu({
|
|
|
313
356
|
|
|
314
357
|
useEffect(() => {
|
|
315
358
|
if (open) {
|
|
316
|
-
setView(
|
|
359
|
+
setView(initialView);
|
|
317
360
|
setValue("");
|
|
318
361
|
setAgentName("");
|
|
319
362
|
setAgentDescription("");
|
|
@@ -326,7 +369,7 @@ function CreateMenu({
|
|
|
326
369
|
setSkillUploadFileName("");
|
|
327
370
|
setSkillFlyoutOpen(false);
|
|
328
371
|
}
|
|
329
|
-
}, [open]);
|
|
372
|
+
}, [initialView, open]);
|
|
330
373
|
|
|
331
374
|
useEffect(() => {
|
|
332
375
|
if (view !== "menu" && view !== "agent-form") {
|
|
@@ -642,22 +685,36 @@ The result should be a reusable agent profile, not a one-off task response.`,
|
|
|
642
685
|
e.target.value = "";
|
|
643
686
|
}}
|
|
644
687
|
/>
|
|
645
|
-
|
|
646
|
-
<
|
|
647
|
-
<
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
688
|
+
{triggerVariant === "outline" ? (
|
|
689
|
+
<PopoverTrigger asChild>
|
|
690
|
+
<Button
|
|
691
|
+
type="button"
|
|
692
|
+
variant="outline"
|
|
693
|
+
size="sm"
|
|
694
|
+
className="h-7 gap-1.5 px-2.5 text-xs"
|
|
695
|
+
>
|
|
696
|
+
<IconPlus className="size-3.5" />
|
|
697
|
+
{triggerLabel ?? "Add resource"}
|
|
698
|
+
</Button>
|
|
699
|
+
</PopoverTrigger>
|
|
700
|
+
) : (
|
|
701
|
+
<Tooltip>
|
|
702
|
+
<TooltipTrigger asChild>
|
|
703
|
+
<PopoverTrigger asChild>
|
|
704
|
+
<button
|
|
705
|
+
type="button"
|
|
706
|
+
className={cn(
|
|
707
|
+
"flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-accent/50",
|
|
708
|
+
open && "bg-accent/50 text-foreground",
|
|
709
|
+
)}
|
|
710
|
+
>
|
|
711
|
+
<IconPlus className="h-3.5 w-3.5" />
|
|
712
|
+
</button>
|
|
713
|
+
</PopoverTrigger>
|
|
714
|
+
</TooltipTrigger>
|
|
715
|
+
<TooltipContent>Create new...</TooltipContent>
|
|
716
|
+
</Tooltip>
|
|
717
|
+
)}
|
|
661
718
|
<PopoverContent
|
|
662
719
|
align="end"
|
|
663
720
|
sideOffset={6}
|
|
@@ -1522,6 +1579,70 @@ export function ResourcesPanel({
|
|
|
1522
1579
|
);
|
|
1523
1580
|
};
|
|
1524
1581
|
|
|
1582
|
+
const renderEmptyStateAction = (targetScope: ResourceScope) => {
|
|
1583
|
+
if (targetScope === "shared" && !canEditOrg) return null;
|
|
1584
|
+
|
|
1585
|
+
const label = resourceFilter
|
|
1586
|
+
? EMPTY_RESOURCE_ACTION_LABELS[resourceFilter]
|
|
1587
|
+
: "Add resource";
|
|
1588
|
+
|
|
1589
|
+
if (
|
|
1590
|
+
!resourceFilter ||
|
|
1591
|
+
resourceFilter === "files" ||
|
|
1592
|
+
resourceFilter === "agents" ||
|
|
1593
|
+
resourceFilter === "skills"
|
|
1594
|
+
) {
|
|
1595
|
+
return (
|
|
1596
|
+
<CreateMenu
|
|
1597
|
+
scope={targetScope}
|
|
1598
|
+
resourceFilter={resourceFilter}
|
|
1599
|
+
onCreateFile={(name) => handleCreateFromToolbar(targetScope, name)}
|
|
1600
|
+
onCreateResource={(path, content, mimeType, opts) =>
|
|
1601
|
+
handleCreateResourceFromToolbar(
|
|
1602
|
+
targetScope,
|
|
1603
|
+
path,
|
|
1604
|
+
content,
|
|
1605
|
+
mimeType,
|
|
1606
|
+
opts,
|
|
1607
|
+
)
|
|
1608
|
+
}
|
|
1609
|
+
onCreateMcpServer={handleCreateMcpServer}
|
|
1610
|
+
canCreateOrgMcp={canCreateOrgMcp}
|
|
1611
|
+
hasOrg={hasOrgForMcp}
|
|
1612
|
+
showToast={showToast}
|
|
1613
|
+
mcpIntegrations={mcpIntegrations}
|
|
1614
|
+
triggerVariant="outline"
|
|
1615
|
+
triggerLabel={label}
|
|
1616
|
+
initialView={resourceFilter === "files" ? "file" : "menu"}
|
|
1617
|
+
/>
|
|
1618
|
+
);
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
const seed = EMPTY_RESOURCE_SEEDS[resourceFilter];
|
|
1622
|
+
if (!seed) return null;
|
|
1623
|
+
|
|
1624
|
+
return (
|
|
1625
|
+
<Button
|
|
1626
|
+
type="button"
|
|
1627
|
+
variant="outline"
|
|
1628
|
+
size="sm"
|
|
1629
|
+
className="h-7 gap-1.5 px-2.5 text-xs"
|
|
1630
|
+
disabled={createResource.isPending}
|
|
1631
|
+
onClick={() =>
|
|
1632
|
+
handleCreateResourceFromToolbar(
|
|
1633
|
+
targetScope,
|
|
1634
|
+
seed.path,
|
|
1635
|
+
seed.content,
|
|
1636
|
+
seed.mimeType,
|
|
1637
|
+
)
|
|
1638
|
+
}
|
|
1639
|
+
>
|
|
1640
|
+
<IconPlus className="size-3.5" />
|
|
1641
|
+
{label}
|
|
1642
|
+
</Button>
|
|
1643
|
+
);
|
|
1644
|
+
};
|
|
1645
|
+
|
|
1525
1646
|
return (
|
|
1526
1647
|
<div
|
|
1527
1648
|
className={cn(
|
|
@@ -1881,6 +2002,7 @@ export function ResourcesPanel({
|
|
|
1881
2002
|
title="Personal"
|
|
1882
2003
|
titleTooltip="Files visible only to you"
|
|
1883
2004
|
sectionAction={renderScopeCreateMenu("personal")}
|
|
2005
|
+
emptyStateAction={renderEmptyStateAction("personal")}
|
|
1884
2006
|
/>
|
|
1885
2007
|
)}
|
|
1886
2008
|
{showSharedTree && (
|
|
@@ -1915,6 +2037,7 @@ export function ResourcesPanel({
|
|
|
1915
2037
|
readOnly={!canEditOrg}
|
|
1916
2038
|
headingHint={!canEditOrg ? "Read only" : undefined}
|
|
1917
2039
|
sectionAction={renderScopeCreateMenu("shared")}
|
|
2040
|
+
emptyStateAction={renderEmptyStateAction("shared")}
|
|
1918
2041
|
/>
|
|
1919
2042
|
)}
|
|
1920
2043
|
</div>
|