@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
|
@@ -2,13 +2,14 @@ export const HELP = `npx @agent-native/core@latest skills
|
|
|
2
2
|
|
|
3
3
|
Usage:
|
|
4
4
|
npx @agent-native/core@latest skills list
|
|
5
|
-
npx @agent-native/core@latest skills status [assets|content|design-exploration|visual-edit|visual-plan|visual-recap|visualize-repo|context-xray|scaffold] [--client codex|claude-code|pi|all] [--scope user|project] [--json]
|
|
6
|
-
npx @agent-native/core@latest skills update [assets|content|design-exploration|visual-edit|visual-plan|visual-recap|visualize-repo|context-xray|scaffold] [--client codex|claude-code|pi|all] [--scope user|project] [--dry-run] [--json]
|
|
7
|
-
npx @agent-native/core@latest skills add assets|content|design-exploration|visual-edit|visual-plan|visual-recap|visualize-repo|context-xray [--client codex|claude-code|cowork|cursor|opencode|github-copilot|all] [--scope user|project] [--mode hosted|local-files|self-hosted] [--mcp-url <url>] [--no-connect] [--with-github-action] [--yes] [--dry-run] [--json]
|
|
5
|
+
npx @agent-native/core@latest skills status [assets|content|rewind|design-exploration|visual-edit|visual-plan|visual-recap|visualize-repo|context-xray|scaffold] [--client codex|claude-code|pi|all] [--scope user|project] [--json]
|
|
6
|
+
npx @agent-native/core@latest skills update [assets|content|rewind|design-exploration|visual-edit|visual-plan|visual-recap|visualize-repo|context-xray|scaffold] [--client codex|claude-code|pi|all] [--scope user|project] [--dry-run] [--json]
|
|
7
|
+
npx @agent-native/core@latest skills add assets|content|rewind|design-exploration|visual-edit|visual-plan|visual-recap|visualize-repo|context-xray [--client codex|claude-code|cowork|cursor|opencode|github-copilot|all] [--scope user|project] [--mode hosted|local-files|self-hosted] [--mcp-url <url>] [--no-connect] [--with-github-action] [--yes] [--dry-run] [--json]
|
|
8
8
|
npx @agent-native/core@latest skills add <manifest-or-app-dir|skill-repo> [--skill <name>] [--client ...] [--yes]
|
|
9
9
|
|
|
10
10
|
Examples:
|
|
11
11
|
npx @agent-native/core@latest skills add assets
|
|
12
|
+
npx @agent-native/core@latest skills add rewind --client codex --scope user --yes
|
|
12
13
|
npx @agent-native/core@latest skills add content --mode local-files
|
|
13
14
|
npx @agent-native/core@latest skills add design-exploration
|
|
14
15
|
npx @agent-native/core@latest skills add visual-edit
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
export * from "./help.js";
|
|
9
9
|
export * from "./assets-skill.js";
|
|
10
10
|
export * from "./content-skill.js";
|
|
11
|
+
export * from "./rewind-skill.js";
|
|
11
12
|
export * from "./design-exploration-skill.js";
|
|
12
13
|
export * from "./design-visual-edit-skill.js";
|
|
13
14
|
export * from "./plan-setup-auth.js";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export const REWIND_SKILL_MD = `---
|
|
2
|
+
name: rewind
|
|
3
|
+
description: >-
|
|
4
|
+
Retrieve recent local Clips Rewind context when the user says "Look at
|
|
5
|
+
Rewind," asks what just happened, or refers to something they recently said
|
|
6
|
+
or saw.
|
|
7
|
+
metadata:
|
|
8
|
+
visibility: exported
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Rewind
|
|
12
|
+
|
|
13
|
+
Use Clips Rewind as local screen memory. Start broad enough to find the right
|
|
14
|
+
moment, then read only the smallest relevant range.
|
|
15
|
+
|
|
16
|
+
## Retrieval Flow
|
|
17
|
+
|
|
18
|
+
1. Call \`screen_memory_status\` first. If the newest segment is still open,
|
|
19
|
+
wait for it to finalize rather than substituting an older segment.
|
|
20
|
+
2. Search \`screen_memory_search_chapters\` before requesting raw recent
|
|
21
|
+
context. Use the user's words, the visible app or project, and the likely
|
|
22
|
+
time range as clues.
|
|
23
|
+
3. If several chapters plausibly match, show the candidates and ask which one
|
|
24
|
+
the user means. Do not blend separate workstreams together.
|
|
25
|
+
4. Read the smallest useful range with \`screen_memory_recent_context\`.
|
|
26
|
+
Restate what you recovered before acting, and flag transcription or coverage
|
|
27
|
+
uncertainty.
|
|
28
|
+
5. Use \`screen_memory_frame_at\` for one exact visual moment or
|
|
29
|
+
\`screen_memory_contact_sheet\` to scan a bounded range. Prefer local frames
|
|
30
|
+
before escalating to cloud processing.
|
|
31
|
+
6. Request the smallest relevant timestamp range through Clips' bounded private
|
|
32
|
+
Clip handoff only when local text and frames are insufficient, such as
|
|
33
|
+
garbled speech, important motion, dense analysis, or a Clip the user wants
|
|
34
|
+
to keep and query later.
|
|
35
|
+
|
|
36
|
+
## Boundaries
|
|
37
|
+
|
|
38
|
+
- Rewind recordings, screenshots, audio, transcripts, OCR, and indexes remain
|
|
39
|
+
local unless the user explicitly asks for a bounded Clip handoff.
|
|
40
|
+
- Do not reveal archive filesystem paths, crawl Clips' app-data folders, or
|
|
41
|
+
bypass the Screen Memory MCP broker.
|
|
42
|
+
- Do not upload frames returned by local Screen Memory tools.
|
|
43
|
+
- Treat foreground apps and chapter labels as evidence, not proof of intent.
|
|
44
|
+
- If the Screen Memory MCP is missing, explain that the one-time setup needs to
|
|
45
|
+
be repaired with:
|
|
46
|
+
|
|
47
|
+
\`npx -y @agent-native/core@latest skills add rewind --client <client> --scope user --yes\`
|
|
48
|
+
|
|
49
|
+
Replace \`<client>\` with the current compatible host: \`codex\`,
|
|
50
|
+
\`claude-code\`, \`cursor\`, \`opencode\`, \`github-copilot\`, or \`cowork\`.
|
|
51
|
+
Ask the user to restart the host if it cannot reload MCP servers in place.
|
|
52
|
+
`;
|
package/src/cli/skills.ts
CHANGED
|
@@ -33,6 +33,10 @@ import {
|
|
|
33
33
|
installLocalContextXray,
|
|
34
34
|
} from "./context-xray-local.js";
|
|
35
35
|
import { CLIENTS, type ClientId } from "./mcp-config-writers.js";
|
|
36
|
+
import {
|
|
37
|
+
installScreenMemoryForClient,
|
|
38
|
+
resolveScreenMemoryStoreDir,
|
|
39
|
+
} from "./mcp.js";
|
|
36
40
|
import { PR_VISUAL_RECAP_SETUP, writePrVisualRecapWorkflow } from "./recap.js";
|
|
37
41
|
import { setupAgentSymlinks } from "./setup-agents.js";
|
|
38
42
|
import {
|
|
@@ -46,6 +50,7 @@ import {
|
|
|
46
50
|
EXEMPLAR_REFERENCE_MD,
|
|
47
51
|
HELP,
|
|
48
52
|
LOCAL_FILES_REFERENCE_MD,
|
|
53
|
+
REWIND_SKILL_MD,
|
|
49
54
|
VISUAL_PLANS_SKILL_MD,
|
|
50
55
|
VISUAL_RECAP_SKILL_MD,
|
|
51
56
|
VISUALIZE_REPO_SKILL_MD,
|
|
@@ -161,6 +166,40 @@ export const BUILT_IN_APP_SKILLS = {
|
|
|
161
166
|
}),
|
|
162
167
|
skillMarkdown: CONTENT_SKILL_MD,
|
|
163
168
|
},
|
|
169
|
+
rewind: {
|
|
170
|
+
skillName: "rewind",
|
|
171
|
+
screenMemoryMcp: true,
|
|
172
|
+
manifest: normalizeAppSkillManifest({
|
|
173
|
+
schemaVersion: 1,
|
|
174
|
+
id: "rewind",
|
|
175
|
+
displayName: "Rewind",
|
|
176
|
+
description:
|
|
177
|
+
"Retrieve recent local Clips screen memory, chapters, transcripts, and exact frames through a privacy-preserving agent workflow.",
|
|
178
|
+
hosted: {
|
|
179
|
+
url: "https://clips.agent-native.com",
|
|
180
|
+
mcpUrl: "https://clips.agent-native.com/mcp",
|
|
181
|
+
},
|
|
182
|
+
mcp: { serverName: "clips-screen-memory" },
|
|
183
|
+
auth: { mode: "none" },
|
|
184
|
+
surfaces: [
|
|
185
|
+
{
|
|
186
|
+
id: "rewind-memory",
|
|
187
|
+
path: "/",
|
|
188
|
+
description:
|
|
189
|
+
"Search and inspect the user's local Clips Rewind memory through a bounded local MCP broker.",
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
skills: [
|
|
193
|
+
{
|
|
194
|
+
path: "skills/rewind",
|
|
195
|
+
visibility: "exported",
|
|
196
|
+
exportAs: "rewind",
|
|
197
|
+
},
|
|
198
|
+
],
|
|
199
|
+
hostAdapters: ["plain-skill", "claude-skill", "generic-mcp"],
|
|
200
|
+
}),
|
|
201
|
+
skillMarkdown: REWIND_SKILL_MD,
|
|
202
|
+
},
|
|
164
203
|
design: {
|
|
165
204
|
skillName: "design-exploration",
|
|
166
205
|
extraSkills: {
|
|
@@ -356,6 +395,7 @@ export const BUILT_IN_APP_SKILLS = {
|
|
|
356
395
|
*/
|
|
357
396
|
extraFiles?: Record<string, Record<string, string>>;
|
|
358
397
|
localOnly?: boolean;
|
|
398
|
+
screenMemoryMcp?: boolean;
|
|
359
399
|
}
|
|
360
400
|
>;
|
|
361
401
|
|
|
@@ -379,6 +419,10 @@ const BUILT_IN_APP_SKILL_ALIASES = {
|
|
|
379
419
|
"local-content": "content",
|
|
380
420
|
"content-local-files": "content",
|
|
381
421
|
"agent-native-content": "content",
|
|
422
|
+
rewind: "rewind",
|
|
423
|
+
"screen-memory": "rewind",
|
|
424
|
+
"clips-rewind": "rewind",
|
|
425
|
+
"agent-native-rewind": "rewind",
|
|
382
426
|
design: "design",
|
|
383
427
|
"ui-design": "design",
|
|
384
428
|
"ux-design": "design",
|
|
@@ -421,6 +465,7 @@ const BUILT_IN_APP_SKILL_DISPLAY_ALIASES = {
|
|
|
421
465
|
"content-local-files",
|
|
422
466
|
"agent-native-content",
|
|
423
467
|
],
|
|
468
|
+
rewind: ["screen-memory", "clips-rewind", "agent-native-rewind"],
|
|
424
469
|
design: [
|
|
425
470
|
"design-exploration",
|
|
426
471
|
"visual-edit",
|
|
@@ -811,6 +856,12 @@ function isLocalOnlyBuiltInSkill(
|
|
|
811
856
|
return Boolean(entry && "localOnly" in entry && entry.localOnly);
|
|
812
857
|
}
|
|
813
858
|
|
|
859
|
+
function isScreenMemoryMcpBuiltInSkill(
|
|
860
|
+
entry: (typeof BUILT_IN_APP_SKILLS)[BuiltInAppSkillId] | null | undefined,
|
|
861
|
+
): boolean {
|
|
862
|
+
return Boolean(entry && "screenMemoryMcp" in entry && entry.screenMemoryMcp);
|
|
863
|
+
}
|
|
864
|
+
|
|
814
865
|
function targetSupportsInstallMode(
|
|
815
866
|
targetId: string | undefined,
|
|
816
867
|
): targetId is ModeAwareAppSkillId {
|
|
@@ -1019,6 +1070,7 @@ function skillFilesForBuiltIn(
|
|
|
1019
1070
|
skillName,
|
|
1020
1071
|
mcpUrl:
|
|
1021
1072
|
isLocalOnlyBuiltInSkill(entry) ||
|
|
1073
|
+
isScreenMemoryMcpBuiltInSkill(entry) ||
|
|
1022
1074
|
localFilesModeSkipsMcp(appSkillId, options.planMode)
|
|
1023
1075
|
? ""
|
|
1024
1076
|
: (options.mcpUrl ?? entry.manifest.hosted.mcpUrl),
|
|
@@ -1238,9 +1290,10 @@ function builtInSkillsRootForAgent(
|
|
|
1238
1290
|
): string {
|
|
1239
1291
|
const home = homeDir() ?? baseDir;
|
|
1240
1292
|
if (scope === "project") {
|
|
1241
|
-
if (agent === "
|
|
1242
|
-
|
|
1243
|
-
|
|
1293
|
+
if (agent === "claude-code" || agent === "claude-code-cli") {
|
|
1294
|
+
return path.join(baseDir, ".claude", "skills");
|
|
1295
|
+
}
|
|
1296
|
+
return path.join(baseDir, ".agents", "skills");
|
|
1244
1297
|
}
|
|
1245
1298
|
if (agent === "codex") {
|
|
1246
1299
|
return process.env.CODEX_HOME
|
|
@@ -1250,6 +1303,13 @@ function builtInSkillsRootForAgent(
|
|
|
1250
1303
|
if (agent === "pi") {
|
|
1251
1304
|
return path.join(home, ".agents", "skills");
|
|
1252
1305
|
}
|
|
1306
|
+
if (
|
|
1307
|
+
agent === "cursor" ||
|
|
1308
|
+
agent === "opencode" ||
|
|
1309
|
+
agent === "github-copilot"
|
|
1310
|
+
) {
|
|
1311
|
+
return path.join(home, ".agents", "skills");
|
|
1312
|
+
}
|
|
1253
1313
|
return path.join(home, ".claude", "skills");
|
|
1254
1314
|
}
|
|
1255
1315
|
|
|
@@ -2128,6 +2188,11 @@ const BUILT_IN_SKILL_PROMPT_OPTIONS: SkillsTargetPromptContext["options"] = [
|
|
|
2128
2188
|
label: "content",
|
|
2129
2189
|
hint: BUILT_IN_APP_SKILLS.content.manifest.description,
|
|
2130
2190
|
},
|
|
2191
|
+
{
|
|
2192
|
+
value: "rewind",
|
|
2193
|
+
label: "rewind",
|
|
2194
|
+
hint: BUILT_IN_APP_SKILLS.rewind.manifest.description,
|
|
2195
|
+
},
|
|
2131
2196
|
{
|
|
2132
2197
|
value: "design-exploration",
|
|
2133
2198
|
label: "design-exploration",
|
|
@@ -3309,7 +3374,13 @@ export async function addAgentNativeSkill(
|
|
|
3309
3374
|
);
|
|
3310
3375
|
}
|
|
3311
3376
|
const knownBuiltIn = knownTarget ? BUILT_IN_APP_SKILLS[knownTarget] : null;
|
|
3377
|
+
const installsScreenMemoryMcp = isScreenMemoryMcpBuiltInSkill(knownBuiltIn);
|
|
3312
3378
|
const baseDir = options.baseDir ?? process.cwd();
|
|
3379
|
+
if (installsScreenMemoryMcp && parsed.mcpUrl) {
|
|
3380
|
+
throw new Error(
|
|
3381
|
+
"Rewind uses the local Clips Screen Memory MCP and does not accept --mcp-url.",
|
|
3382
|
+
);
|
|
3383
|
+
}
|
|
3313
3384
|
if (isLocalOnlyBuiltInSkill(knownBuiltIn)) {
|
|
3314
3385
|
if (parsed.planMode) {
|
|
3315
3386
|
throw new Error(
|
|
@@ -3415,7 +3486,9 @@ export async function addAgentNativeSkill(
|
|
|
3415
3486
|
);
|
|
3416
3487
|
}
|
|
3417
3488
|
installTarget = preserveMcpUrlAppPathOverride(installTarget, parsed.mcpUrl);
|
|
3418
|
-
const skillsAgents =
|
|
3489
|
+
const skillsAgents = installsScreenMemoryMcp
|
|
3490
|
+
? clients
|
|
3491
|
+
: skillsAgentsForClients(clients);
|
|
3419
3492
|
if (parsed.dryRun) {
|
|
3420
3493
|
try {
|
|
3421
3494
|
const localManifestPath = shouldWriteContentLocalFilesManifest(
|
|
@@ -3443,9 +3516,11 @@ export async function addAgentNativeSkill(
|
|
|
3443
3516
|
displayName: installTarget.displayName,
|
|
3444
3517
|
skillNames: installTarget.skillNames,
|
|
3445
3518
|
skillsAgents,
|
|
3446
|
-
mcpUrl:
|
|
3519
|
+
mcpUrl: installsScreenMemoryMcp
|
|
3447
3520
|
? ""
|
|
3448
|
-
:
|
|
3521
|
+
: localFilesModeSkipsMcp(modeAwareTargetId, planMode)
|
|
3522
|
+
? ""
|
|
3523
|
+
: installTarget.loaded.manifest.hosted.mcpUrl,
|
|
3449
3524
|
mcpClients: shouldRegisterMcp ? mcpClients : [],
|
|
3450
3525
|
dryRun: true,
|
|
3451
3526
|
commands: [
|
|
@@ -3545,7 +3620,29 @@ export async function addAgentNativeSkill(
|
|
|
3545
3620
|
dryRun: Boolean(parsed.dryRun),
|
|
3546
3621
|
});
|
|
3547
3622
|
|
|
3548
|
-
if (shouldRegisterMcp) {
|
|
3623
|
+
if (shouldRegisterMcp && installsScreenMemoryMcp) {
|
|
3624
|
+
const screenMemoryDir = resolveScreenMemoryStoreDir();
|
|
3625
|
+
if (!screenMemoryDir) {
|
|
3626
|
+
throw new Error(
|
|
3627
|
+
"No local Clips Screen Memory store was found. Turn Rewind on in Clips, then run the setup again.",
|
|
3628
|
+
);
|
|
3629
|
+
}
|
|
3630
|
+
registeredMcpClients = mcpClients.map((client) => {
|
|
3631
|
+
commands.push(
|
|
3632
|
+
`npx @agent-native/core@latest mcp install-screen-memory --client ${client} --scope ${parsed.scope}`,
|
|
3633
|
+
);
|
|
3634
|
+
installScreenMemoryForClient(
|
|
3635
|
+
client,
|
|
3636
|
+
screenMemoryDir,
|
|
3637
|
+
baseDir,
|
|
3638
|
+
parsed.scope,
|
|
3639
|
+
);
|
|
3640
|
+
return client;
|
|
3641
|
+
});
|
|
3642
|
+
options.telemetry?.track("skills_cli mcp registered", {
|
|
3643
|
+
skills: installTarget.skillNames.join(","),
|
|
3644
|
+
});
|
|
3645
|
+
} else if (shouldRegisterMcp) {
|
|
3549
3646
|
commands.push(
|
|
3550
3647
|
`npx @agent-native/core@latest app-skill ensure --manifest ${installTarget.loaded.file} --client ${parsed.client} --scope ${parsed.scope} --yes`,
|
|
3551
3648
|
);
|
|
@@ -3655,9 +3752,11 @@ export async function addAgentNativeSkill(
|
|
|
3655
3752
|
instructionSource,
|
|
3656
3753
|
skillNames: installTarget.skillNames,
|
|
3657
3754
|
skillsAgents,
|
|
3658
|
-
mcpUrl:
|
|
3755
|
+
mcpUrl: installsScreenMemoryMcp
|
|
3659
3756
|
? ""
|
|
3660
|
-
:
|
|
3757
|
+
: localFilesModeSkipsMcp(modeAwareTargetId, planMode)
|
|
3758
|
+
? ""
|
|
3759
|
+
: installTarget.loaded.manifest.hosted.mcpUrl,
|
|
3661
3760
|
mcpClients: registeredMcpClients,
|
|
3662
3761
|
dryRun: parsed.dryRun,
|
|
3663
3762
|
commands,
|
|
@@ -3689,10 +3788,13 @@ function listSkills(options: RunSkillsOptions = {}) {
|
|
|
3689
3788
|
] ?? [],
|
|
3690
3789
|
name: entry.manifest.displayName,
|
|
3691
3790
|
description: entry.manifest.description,
|
|
3692
|
-
mcpUrl:
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3791
|
+
mcpUrl:
|
|
3792
|
+
isLocalOnlyBuiltInSkill(entry) || isScreenMemoryMcpBuiltInSkill(entry)
|
|
3793
|
+
? ""
|
|
3794
|
+
: entry.manifest.hosted.mcpUrl,
|
|
3795
|
+
local:
|
|
3796
|
+
isLocalOnlyBuiltInSkill(entry) ||
|
|
3797
|
+
isScreenMemoryMcpBuiltInSkill(entry),
|
|
3696
3798
|
source: "agent-native",
|
|
3697
3799
|
})),
|
|
3698
3800
|
...publicSkillEntries(options).map((entry) => ({
|
|
@@ -120,6 +120,8 @@ export interface ResourceTreeProps {
|
|
|
120
120
|
headingHint?: React.ReactNode;
|
|
121
121
|
/** Scope-specific action shown beside the section heading. */
|
|
122
122
|
sectionAction?: React.ReactNode;
|
|
123
|
+
/** Scope-specific action shown beneath an empty collection message. */
|
|
124
|
+
emptyStateAction?: React.ReactNode;
|
|
123
125
|
}
|
|
124
126
|
|
|
125
127
|
interface CreatingState {
|
|
@@ -638,6 +640,7 @@ export function ResourceTree({
|
|
|
638
640
|
readOnly = false,
|
|
639
641
|
headingHint,
|
|
640
642
|
sectionAction,
|
|
643
|
+
emptyStateAction,
|
|
641
644
|
}: ResourceTreeProps) {
|
|
642
645
|
const [expanded, setExpanded] = useState<Set<string>>(() => new Set());
|
|
643
646
|
const [creating, setCreating] = useState<CreatingState | null>(null);
|
|
@@ -848,11 +851,14 @@ export function ResourceTree({
|
|
|
848
851
|
{isEmpty && !creating && !isLoading && (
|
|
849
852
|
<div className="flex items-start gap-2 border-y border-border/60 px-2 py-4">
|
|
850
853
|
<IconFile className="mt-0.5 size-3.5 shrink-0 text-muted-foreground" />
|
|
851
|
-
<
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
854
|
+
<div className="flex flex-col items-start gap-2">
|
|
855
|
+
<p className="text-xs text-muted-foreground">
|
|
856
|
+
{variant === "collection"
|
|
857
|
+
? "No resources in this collection yet"
|
|
858
|
+
: "No files yet"}
|
|
859
|
+
</p>
|
|
860
|
+
{emptyStateAction}
|
|
861
|
+
</div>
|
|
856
862
|
</div>
|
|
857
863
|
)}
|
|
858
864
|
</div>
|
|
@@ -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>
|