paperclip-plugin-supermemory-otomatik 0.2.6 → 0.2.8
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/README.md +4 -2
- package/dist/manifest.js +1 -1
- package/dist/manifest.js.map +1 -1
- package/dist/ui/index.js +76 -36
- package/dist/ui/index.js.map +2 -2
- package/dist/worker.js +33131 -47
- package/dist/worker.js.map +4 -4
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ The plugin uses Paperclip's standard plugin slots (`settingsPage`, `page`, `side
|
|
|
13
13
|
|
|
14
14
|
## Install from Paperclip
|
|
15
15
|
|
|
16
|
-
Package: [`paperclip-plugin-supermemory-otomatik`](https://www.npmjs.com/package/paperclip-plugin-supermemory-otomatik) **0.2.
|
|
16
|
+
Package: [`paperclip-plugin-supermemory-otomatik`](https://www.npmjs.com/package/paperclip-plugin-supermemory-otomatik) **0.2.8**.
|
|
17
17
|
|
|
18
18
|
1. In Paperclip, open **Settings → Plugins → Install Plugin**.
|
|
19
19
|
2. Enter `paperclip-plugin-supermemory-otomatik` and install it for the instance.
|
|
@@ -50,7 +50,7 @@ For project namespaces, select only agents who already have project access in Pa
|
|
|
50
50
|
|
|
51
51
|
## Memory content types
|
|
52
52
|
|
|
53
|
-
The page mirrors the Instructions layout: left content list, **Leggi / Modifica / Raw**, text editing, drag-and-drop and file upload. It supports:
|
|
53
|
+
The page mirrors the Instructions layout: left content list, **Leggi / Modifica / Raw**, text editing, drag-and-drop and file upload. The workspace fits the available Paperclip window; long documents scroll inside their content panel. It supports:
|
|
54
54
|
|
|
55
55
|
- Text files: TXT, Markdown, HTML, JSON and CSV (up to 1 MB).
|
|
56
56
|
- Public web URLs. Supermemory Local needs its Firecrawl integration configured; URL extraction sends the URL/page to Firecrawl.
|
|
@@ -58,6 +58,8 @@ The page mirrors the Instructions layout: left content list, **Leggi / Modifica
|
|
|
58
58
|
|
|
59
59
|
Text and URL content can be edited and reindexed. Binary file contents cannot be retrieved into the editor; delete the catalog item and upload a replacement to update one. Office, audio and video formats appear in some hosted Supermemory documentation but are not documented for the installed Supermemory Local server, so this plugin does not offer them as verified Local formats.
|
|
60
60
|
|
|
61
|
+
PDFs are also text-extracted locally in the Paperclip worker and sent to Supermemory as linked text documents. This provides searchable content even when the Local binary PDF OCR provider cannot process a file. Deleting a PDF removes both its binary source and all linked extracted-text documents from Supermemory.
|
|
62
|
+
|
|
61
63
|
The content is indexed as retrieval/reference material (`taskType: "superrag"`) rather than used to update a personal profile. Text, URL, file, search, update, and delete requests all pass through the ACL gateway. The plugin sends file bytes as JSON/base64 through Paperclip; the gateway converts them to multipart before forwarding them to Local. Supermemory returns an asynchronous status; `queued` means indexing has started, not finished.
|
|
62
64
|
|
|
63
65
|
## Tools
|
package/dist/manifest.js
CHANGED
|
@@ -9,7 +9,7 @@ var MEMORY_ROUTE = "memory";
|
|
|
9
9
|
var manifest = {
|
|
10
10
|
id: PLUGIN_ID,
|
|
11
11
|
apiVersion: 1,
|
|
12
|
-
version: "0.2.
|
|
12
|
+
version: "0.2.8",
|
|
13
13
|
minimumHostVersion: "2026.1023.0",
|
|
14
14
|
displayName: "Supermemory (self-hosted)",
|
|
15
15
|
description: "Memory tools and an Owner-managed memory library for self-hosted Supermemory, with company-, agent-, and project-scoped access.",
|
package/dist/manifest.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/manifest.ts"],
|
|
4
|
-
"sourcesContent": ["import type { PaperclipPluginManifestV1 } from \"@paperclipai/plugin-sdk\";\n\nexport const PLUGIN_ID = \"paperclipai.supermemory\";\nexport const SEARCH_TOOL = \"search-approved-memory\";\nexport const SAVE_TOOL = \"submit-memory-candidate\";\nexport const MEMORY_SETTINGS_PAGE = \"supermemory-settings\";\nexport const MEMORY_PAGE = \"supermemory-memory\";\nexport const MEMORY_SIDEBAR = \"supermemory-sidebar\";\nexport const MEMORY_ROUTE = \"memory\";\n\nconst manifest: PaperclipPluginManifestV1 = {\n id: PLUGIN_ID,\n apiVersion: 1,\n version: \"0.2.
|
|
4
|
+
"sourcesContent": ["import type { PaperclipPluginManifestV1 } from \"@paperclipai/plugin-sdk\";\n\nexport const PLUGIN_ID = \"paperclipai.supermemory\";\nexport const SEARCH_TOOL = \"search-approved-memory\";\nexport const SAVE_TOOL = \"submit-memory-candidate\";\nexport const MEMORY_SETTINGS_PAGE = \"supermemory-settings\";\nexport const MEMORY_PAGE = \"supermemory-memory\";\nexport const MEMORY_SIDEBAR = \"supermemory-sidebar\";\nexport const MEMORY_ROUTE = \"memory\";\n\nconst manifest: PaperclipPluginManifestV1 = {\n id: PLUGIN_ID,\n apiVersion: 1,\n version: \"0.2.8\",\n minimumHostVersion: \"2026.1023.0\",\n displayName: \"Supermemory (self-hosted)\",\n description: \"Memory tools and an Owner-managed memory library for self-hosted Supermemory, with company-, agent-, and project-scoped access.\",\n author: \"Otomatik\",\n categories: [\"connector\", \"automation\", \"ui\"],\n capabilities: [\n \"agent.tools.register\",\n \"agents.read\",\n \"projects.read\",\n \"access.members.read\",\n \"http.outbound\",\n \"instance.settings.register\",\n \"secrets.read-ref\",\n \"ui.page.register\",\n \"ui.sidebar.register\",\n ],\n entrypoints: {\n worker: \"./dist/worker.js\",\n ui: \"./dist/ui\",\n },\n instanceConfigSchema: {\n type: \"object\",\n properties: {\n gatewayUrl: {\n type: \"string\",\n title: \"Gateway Supermemory su Tailscale HTTPS\",\n description: \"URL HTTPS tailnet del gateway ACL e delle operazioni Owner. Esempio OTOMATIK: https://otomatik.tail77a9ab.ts.net:18443/mcp. Supermemory Local resta privato sul server.\",\n default: \"https://otomatik.tail77a9ab.ts.net:18443/mcp\",\n },\n localApiUrl: {\n type: \"string\",\n title: \"Legacy Supermemory Local API URL\",\n description: \"Legacy value retained for existing configurations; ignored since plugin 0.2.3. The Local API is reached only by the server-side gateway.\",\n },\n adminApiKeyRef: {\n // Paperclip persists a secret-ref format as an object binding, even\n // though the format marker historically describes a string picker.\n type: [\"string\", \"object\"],\n format: \"secret-ref\",\n title: \"Secret con la chiave master Supermemory Local\",\n description: \"Usata come credenziale per le route Owner del gateway Tailscale. Viene risolta solo dopo il controllo Owner o per una ricerca con namespace assegnato esplicitamente; non viene esposta nei prompt.\",\n },\n agentGrants: {\n type: \"array\",\n title: \"Authorized agents\",\n description: \"Only listed Paperclip agents can use the memory tools. Each one uses its own ACL gateway token secret, already bound to the same agent, company, and role.\",\n items: {\n type: \"object\",\n title: \"Agent grant\",\n required: [\"agentId\", \"tokenRef\"],\n properties: {\n agentId: {\n type: \"string\",\n title: \"Paperclip agent\",\n minLength: 1,\n },\n tokenRef: {\n type: [\"string\", \"object\"],\n format: \"secret-ref\",\n title: \"This agent's ACL token secret\",\n description: \"Select the Paperclip company secret containing only this agent's Supermemory ACL token.\",\n },\n },\n },\n default: [],\n },\n },\n },\n tools: [\n {\n name: SEARCH_TOOL,\n displayName: \"Search approved Supermemory\",\n description: \"Search this agent's explicitly authorized company/team compartments and any assigned agent/project namespaces. Project memory is available only when the Paperclip run is in that project and the agent is on its explicit allowlist. Do not search for credentials or personal records.\",\n parametersSchema: {\n type: \"object\",\n properties: {\n query: { type: \"string\", minLength: 1, maxLength: 300 },\n searchMode: { type: \"string\", enum: [\"hybrid\", \"memories\", \"chunks\"], default: \"hybrid\" },\n limit: { type: \"integer\", minimum: 1, maximum: 5, default: 3 },\n },\n required: [\"query\"],\n additionalProperties: false,\n },\n },\n {\n name: SAVE_TOOL,\n displayName: \"Submit a Supermemory candidate\",\n description: \"Submit one durable, non-sensitive fact or decision to this agent's role staging compartment for human review. This does not publish it to shared approved memory. Never submit credentials, personal data, customer cases, legal/health/workplace records, or full chat transcripts.\",\n parametersSchema: {\n type: \"object\",\n properties: {\n content: { type: \"string\", minLength: 20, maxLength: 1200 },\n },\n required: [\"content\"],\n additionalProperties: false,\n },\n },\n ],\n ui: {\n slots: [\n {\n type: \"settingsPage\",\n id: MEMORY_SETTINGS_PAGE,\n displayName: \"Supermemory settings\",\n exportName: \"SupermemorySettingsPage\",\n },\n {\n type: \"page\",\n id: MEMORY_PAGE,\n displayName: \"Memory\",\n exportName: \"MemoryPage\",\n routePath: MEMORY_ROUTE,\n },\n {\n type: \"sidebar\",\n id: MEMORY_SIDEBAR,\n displayName: \"Memory\",\n exportName: \"MemorySidebarLink\",\n },\n ],\n },\n};\n\nexport default manifest;\n"],
|
|
5
5
|
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/ui/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/ui/index.tsx
|
|
2
|
-
import { useCallback, useEffect, useState } from "react";
|
|
2
|
+
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
3
3
|
import {
|
|
4
4
|
MarkdownBlock,
|
|
5
5
|
useHostContext,
|
|
@@ -275,6 +275,8 @@ function MemoryPage() {
|
|
|
275
275
|
const uploadFile = usePluginAction("memory-file-upload");
|
|
276
276
|
const deleteDocument = usePluginAction("memory-document-delete");
|
|
277
277
|
const navigation = useHostNavigation();
|
|
278
|
+
const pageRef = useRef(null);
|
|
279
|
+
const [pageHeight, setPageHeight] = useState(null);
|
|
278
280
|
const [catalog, setCatalog] = useState(null);
|
|
279
281
|
const [loading, setLoading] = useState(true);
|
|
280
282
|
const [error, setError] = useState(null);
|
|
@@ -293,6 +295,28 @@ function MemoryPage() {
|
|
|
293
295
|
const [showAssignment, setShowAssignment] = useState(false);
|
|
294
296
|
const [showUrlForm, setShowUrlForm] = useState(false);
|
|
295
297
|
const [urlInput, setUrlInput] = useState("");
|
|
298
|
+
useLayoutEffect(() => {
|
|
299
|
+
const measure = () => {
|
|
300
|
+
const page = pageRef.current;
|
|
301
|
+
if (!page) return;
|
|
302
|
+
const viewportHeight = window.visualViewport?.height ?? window.innerHeight;
|
|
303
|
+
const top = Math.max(0, page.getBoundingClientRect().top);
|
|
304
|
+
const available = Math.max(360, Math.floor(viewportHeight - top - 16));
|
|
305
|
+
setPageHeight((current) => current === null || Math.abs(current - available) > 1 ? available : current);
|
|
306
|
+
};
|
|
307
|
+
measure();
|
|
308
|
+
window.addEventListener("resize", measure);
|
|
309
|
+
window.addEventListener("scroll", measure, true);
|
|
310
|
+
window.visualViewport?.addEventListener("resize", measure);
|
|
311
|
+
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
|
|
312
|
+
if (pageRef.current?.parentElement) observer?.observe(pageRef.current.parentElement);
|
|
313
|
+
return () => {
|
|
314
|
+
window.removeEventListener("resize", measure);
|
|
315
|
+
window.removeEventListener("scroll", measure, true);
|
|
316
|
+
window.visualViewport?.removeEventListener("resize", measure);
|
|
317
|
+
observer?.disconnect();
|
|
318
|
+
};
|
|
319
|
+
}, []);
|
|
296
320
|
const refreshCatalog = useCallback(async (keepAssignmentId) => {
|
|
297
321
|
if (!companyId) return;
|
|
298
322
|
const data = await loadCatalog({ companyId });
|
|
@@ -538,8 +562,8 @@ function MemoryPage() {
|
|
|
538
562
|
/* @__PURE__ */ jsx("span", { style: mutedStyle, children: "I documenti e le assegnazioni non sono visibili agli altri membri dell\u2019organizzazione." })
|
|
539
563
|
] })
|
|
540
564
|
] });
|
|
541
|
-
return /* @__PURE__ */ jsxs("main", { style: pageStyle, children: [
|
|
542
|
-
/* @__PURE__ */ jsxs("header", { style: { display: "flex", alignItems: "start", justifyContent: "space-between", gap: 16, marginBottom: 20 }, children: [
|
|
565
|
+
return /* @__PURE__ */ jsxs("main", { ref: pageRef, style: { ...pageStyle, boxSizing: "border-box", height: pageHeight ?? "calc(100vh - 160px)", minHeight: 0, display: "flex", flexDirection: "column", overflow: "hidden" }, children: [
|
|
566
|
+
/* @__PURE__ */ jsxs("header", { style: { display: "flex", alignItems: "start", justifyContent: "space-between", gap: 16, marginBottom: 20, flexShrink: 0 }, children: [
|
|
543
567
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
544
568
|
/* @__PURE__ */ jsx("h1", { style: { fontSize: 26, fontWeight: 650, margin: 0 }, children: "Memory" }),
|
|
545
569
|
/* @__PURE__ */ jsx("p", { style: { ...mutedStyle, margin: "6px 0 0", maxWidth: 760 }, children: "Gestisci namespace e contenuti Supermemory per questa organizzazione. Questa libreria \xE8 visibile solo agli Owner." })
|
|
@@ -559,12 +583,12 @@ function MemoryPage() {
|
|
|
559
583
|
/* @__PURE__ */ jsx("a", { ...navigation.linkProps("/company/settings/instance/plugins/paperclipai.supermemory"), style: { ...secondaryButtonStyle, textDecoration: "none" }, children: "Configurazione" })
|
|
560
584
|
] })
|
|
561
585
|
] }),
|
|
562
|
-
error ? /* @__PURE__ */ jsx("div", { role: "alert", style: { ...panelStyle, padding: 12, marginBottom: 16, borderColor: "var(--destructive, #b91c1c)" }, children: error }) : null,
|
|
563
|
-
!catalog?.configured ? /* @__PURE__ */ jsxs("div", { style: { ...panelStyle, padding: 14, marginBottom: 16 }, children: [
|
|
586
|
+
error ? /* @__PURE__ */ jsx("div", { role: "alert", style: { ...panelStyle, padding: 12, marginBottom: 16, borderColor: "var(--destructive, #b91c1c)", flexShrink: 0 }, children: error }) : null,
|
|
587
|
+
!catalog?.configured ? /* @__PURE__ */ jsxs("div", { style: { ...panelStyle, padding: 14, marginBottom: 16, flexShrink: 0 }, children: [
|
|
564
588
|
/* @__PURE__ */ jsx("strong", { children: "Chiave master non configurata." }),
|
|
565
589
|
/* @__PURE__ */ jsx("span", { style: { ...mutedStyle, marginLeft: 6 }, children: "Le assegnazioni saranno salvate, ma l\u2019indicizzazione e la ricerca nei namespace restano disattivate finch\xE9 non selezioni il secret Supermemory Local nella configurazione del plugin." })
|
|
566
590
|
] }) : null,
|
|
567
|
-
showAssignment ? /* @__PURE__ */ jsxs("form", { onSubmit: saveAssignmentForm, style: { ...panelStyle, padding: 18, display: "grid", gap: 13, marginBottom: 18 }, children: [
|
|
591
|
+
showAssignment ? /* @__PURE__ */ jsxs("form", { onSubmit: saveAssignmentForm, style: { ...panelStyle, padding: 18, display: "grid", gap: 13, marginBottom: 18, maxHeight: "min(38vh, 340px)", overflowY: "auto", flexShrink: 0 }, children: [
|
|
568
592
|
/* @__PURE__ */ jsx("h2", { style: { fontSize: 17, margin: 0 }, children: editingAssignmentId ? "Modifica assegnazione del namespace" : "Assegna un namespace" }),
|
|
569
593
|
/* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "minmax(160px, 220px) minmax(220px, 1fr)", gap: 12 }, children: [
|
|
570
594
|
/* @__PURE__ */ jsxs("label", { style: { display: "grid", gap: 6, fontSize: 13 }, children: [
|
|
@@ -607,14 +631,14 @@ function MemoryPage() {
|
|
|
607
631
|
}, children: "Annulla" })
|
|
608
632
|
] })
|
|
609
633
|
] }) : null,
|
|
610
|
-
/* @__PURE__ */ jsxs("section", { style: { display: "grid", gridTemplateColumns: "minmax(230px, 285px) minmax(0, 1fr)", gap: 18, minHeight:
|
|
611
|
-
/* @__PURE__ */ jsxs("aside", { style: { ...panelStyle, padding: 14, display: "flex", flexDirection: "column", minWidth: 0 }, children: [
|
|
634
|
+
/* @__PURE__ */ jsxs("section", { style: { display: "grid", gridTemplateColumns: "minmax(230px, 285px) minmax(0, 1fr)", gap: 18, flex: 1, minHeight: 0, overflow: "hidden" }, children: [
|
|
635
|
+
/* @__PURE__ */ jsxs("aside", { style: { ...panelStyle, padding: 14, display: "flex", flexDirection: "column", minWidth: 0, minHeight: 0, overflow: "hidden" }, children: [
|
|
612
636
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8, marginBottom: 10 }, children: [
|
|
613
637
|
/* @__PURE__ */ jsx("h2", { style: { fontSize: 15, margin: 0 }, children: "Namespace e file" }),
|
|
614
638
|
/* @__PURE__ */ jsx("span", { style: { ...mutedStyle, fontSize: 12 }, children: catalog?.assignments.length ?? 0 })
|
|
615
639
|
] }),
|
|
616
640
|
!catalog?.assignments.length ? /* @__PURE__ */ jsx("div", { style: { ...mutedStyle, fontSize: 13, padding: "12px 2px" }, children: "Nessun namespace. Usa \u201CAssegna namespace\u201D per iniziare." }) : null,
|
|
617
|
-
/* @__PURE__ */ jsx("div", { style: { display: "
|
|
641
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: 12, flex: 1, minHeight: 0, overflowY: "auto" }, children: (catalog?.assignments ?? []).map((assignment) => {
|
|
618
642
|
const docs = catalog?.documents.filter((item) => item.assignmentId === assignment.id) ?? [];
|
|
619
643
|
const selected = assignment.id === activeAssignmentId;
|
|
620
644
|
return /* @__PURE__ */ jsxs("div", { style: { border: `1px solid ${selected ? "var(--ring, var(--primary))" : "var(--border)"}`, borderRadius: 8, overflow: "hidden" }, children: [
|
|
@@ -651,7 +675,7 @@ function MemoryPage() {
|
|
|
651
675
|
] })
|
|
652
676
|
] }) : null
|
|
653
677
|
] }),
|
|
654
|
-
/* @__PURE__ */ jsxs("section", { style: { ...panelStyle, minWidth: 0, display: "flex", flexDirection: "column", overflow: "hidden" }, children: [
|
|
678
|
+
/* @__PURE__ */ jsxs("section", { style: { ...panelStyle, minWidth: 0, minHeight: 0, display: "flex", flexDirection: "column", overflow: "hidden" }, children: [
|
|
655
679
|
/* @__PURE__ */ jsxs("div", { onDragOver: (event) => event.preventDefault(), onDrop, style: { padding: 16, borderBottom: "1px solid var(--border)", display: "flex", justifyContent: "space-between", alignItems: "start", gap: 14, flexWrap: "wrap" }, children: [
|
|
656
680
|
/* @__PURE__ */ jsxs("div", { style: { minWidth: 0, flex: "1 1 280px" }, children: [
|
|
657
681
|
/* @__PURE__ */ jsx("h2", { style: { fontSize: 16, margin: 0 }, children: activeAssignment?.label ?? "Seleziona un namespace" }),
|
|
@@ -677,36 +701,52 @@ function MemoryPage() {
|
|
|
677
701
|
/* @__PURE__ */ jsx("strong", { children: "Trascina qui un file" }),
|
|
678
702
|
/* @__PURE__ */ jsx("p", { style: { ...mutedStyle, fontSize: 13, lineHeight: 1.55 }, children: "Testo: TXT, Markdown, HTML, JSON e CSV (max 1 MB). File binari verificati per Supermemory Local: PDF, PNG, JPG/JPEG, GIF e WebP (max 6 MiB in questa interfaccia). Puoi anche aggiungere un URL pubblico." }),
|
|
679
703
|
/* @__PURE__ */ jsx("span", { style: { ...mutedStyle, fontSize: 12 }, children: "Office, audio e video sono supportati da alcune versioni del servizio hosted, ma non sono documentati per il server Local installato." })
|
|
680
|
-
] }) }) : /* @__PURE__ */ jsxs("div", { style: { flex: 1, minHeight:
|
|
681
|
-
/* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "minmax(0, 1fr) auto", gap: 12, alignItems: "end" }, children: [
|
|
704
|
+
] }) }) : /* @__PURE__ */ jsxs("div", { style: { flex: 1, minHeight: 0, padding: 18, display: "flex", flexDirection: "column", gap: 14, overflow: "hidden" }, children: [
|
|
705
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "minmax(0, 1fr) auto", gap: 12, alignItems: "end", flexShrink: 0 }, children: [
|
|
682
706
|
/* @__PURE__ */ jsxs("label", { style: { display: "grid", gap: 6, fontSize: 12 }, children: [
|
|
683
707
|
"Titolo",
|
|
684
708
|
/* @__PURE__ */ jsx("input", { style: inputStyle, value: title, readOnly: mode === "read" || mode === "raw" || document.kind === "file", onChange: (event) => editField(setTitle, event.target.value) })
|
|
685
709
|
] }),
|
|
686
|
-
/* @__PURE__ */ jsx("span", { style: { ...mutedStyle, fontSize: 11, whiteSpace: "nowrap" }, children: document.status === "done" ? "Indicizzato" : `Stato: ${document.status}` })
|
|
710
|
+
/* @__PURE__ */ jsx("span", { style: { ...mutedStyle, fontSize: 11, whiteSpace: "nowrap" }, children: document.kind === "file" && document.indexedTextDocumentIds?.length ? `Testo: ${document.indexedTextStatus ?? document.status}` : document.status === "done" ? "Indicizzato" : `Stato: ${document.status}` })
|
|
687
711
|
] }),
|
|
688
|
-
|
|
689
|
-
/* @__PURE__ */
|
|
690
|
-
|
|
691
|
-
"
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
712
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minHeight: 0, overflow: "auto", display: mode === "edit" && document.kind !== "file" ? "flex" : "block" }, children: [
|
|
713
|
+
mode === "read" ? document.kind === "file" ? /* @__PURE__ */ jsxs("div", { style: { ...panelStyle, padding: 18 }, children: [
|
|
714
|
+
/* @__PURE__ */ jsx("strong", { children: document.indexedTextDocumentIds?.length ? "PDF ricevuto e testo estratto" : "File PDF conservato da Supermemory" }),
|
|
715
|
+
/* @__PURE__ */ jsxs("p", { style: { ...mutedStyle, marginBottom: 0 }, children: [
|
|
716
|
+
"Nome: ",
|
|
717
|
+
document.fileName ?? document.title,
|
|
718
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
719
|
+
"Tipo: ",
|
|
720
|
+
document.mimeType ?? "non specificato",
|
|
721
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
722
|
+
document.indexedTextDocumentIds?.length ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
723
|
+
"Testo estratto e inviato a Supermemory in ",
|
|
724
|
+
document.indexedTextDocumentIds.length,
|
|
725
|
+
" documento/i. Stato dell\u2019indice testuale: ",
|
|
726
|
+
document.indexedTextStatus ?? document.status,
|
|
727
|
+
". Stato del file originale: ",
|
|
728
|
+
document.binaryProcessingStatus ?? "non disponibile",
|
|
729
|
+
"."
|
|
730
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
731
|
+
"Non \xE8 disponibile un indice testuale collegato. Stato del file: ",
|
|
732
|
+
document.binaryProcessingStatus ?? document.status,
|
|
733
|
+
"; finch\xE9 l\u2019elaborazione non termina, la ricerca potrebbe non trovare il contenuto."
|
|
734
|
+
] }),
|
|
735
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
736
|
+
"Per sostituirlo, elimina questa voce e carica la versione aggiornata."
|
|
737
|
+
] })
|
|
738
|
+
] }) : document.kind === "url" ? /* @__PURE__ */ jsxs("div", { style: { ...panelStyle, padding: 18, overflowWrap: "anywhere" }, children: [
|
|
739
|
+
/* @__PURE__ */ jsx("strong", { children: "Pagina indicizzata" }),
|
|
740
|
+
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("a", { href: document.sourceUrl ?? content, target: "_blank", rel: "noopener noreferrer", style: { textDecoration: "underline" }, children: document.sourceUrl ?? content }) }),
|
|
741
|
+
/* @__PURE__ */ jsx("p", { style: { ...mutedStyle, marginBottom: 0 }, children: "Supermemory conserva l\u2019indice estratto; per aggiornare il contenuto salva di nuovo l\u2019URL." })
|
|
742
|
+
] }) : /* @__PURE__ */ jsx("div", { style: { ...panelStyle, padding: 16 }, children: /* @__PURE__ */ jsx(MarkdownBlock, { content }) }) : null,
|
|
743
|
+
mode === "edit" ? document.kind === "file" ? /* @__PURE__ */ jsxs("div", { style: { ...panelStyle, padding: 18 }, children: [
|
|
744
|
+
/* @__PURE__ */ jsx("strong", { children: "Il contenuto del file non \xE8 modificabile in-place." }),
|
|
745
|
+
/* @__PURE__ */ jsx("p", { style: { ...mutedStyle, marginBottom: 0 }, children: "Per aggiornarlo, elimina il documento e carica il file aggiornato." })
|
|
746
|
+
] }) : /* @__PURE__ */ jsx("textarea", { style: { ...inputStyle, flex: 1, minHeight: 0, resize: "none", fontFamily: "var(--font-mono, ui-monospace, monospace)", lineHeight: 1.6 }, value: content, onChange: (event) => editField(setContent, event.target.value) }) : null,
|
|
747
|
+
mode === "raw" ? /* @__PURE__ */ jsx("pre", { style: { ...panelStyle, padding: 16, margin: 0, whiteSpace: "pre-wrap", overflowWrap: "anywhere", fontSize: 12 }, children: JSON.stringify({ ...document, title, content }, null, 2) }) : null
|
|
748
|
+
] }),
|
|
749
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 8, justifyContent: "space-between", borderTop: "1px solid var(--border)", paddingTop: 12, flexShrink: 0 }, children: [
|
|
710
750
|
/* @__PURE__ */ jsx("button", { type: "button", style: { ...secondaryButtonStyle, color: "var(--destructive, #b91c1c)" }, onClick: () => void removeDocument(), disabled: busy || !document.id, children: "Elimina documento" }),
|
|
711
751
|
/* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 8 }, children: mode === "edit" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
712
752
|
/* @__PURE__ */ jsx("button", { type: "button", style: secondaryButtonStyle, onClick: () => {
|
|
@@ -722,7 +762,7 @@ function MemoryPage() {
|
|
|
722
762
|
busy ? /* @__PURE__ */ jsx("div", { "aria-live": "polite", style: { borderTop: "1px solid var(--border)", padding: "8px 14px", fontSize: 12, ...mutedStyle }, children: "Operazione in corso\u2026" }) : null
|
|
723
763
|
] })
|
|
724
764
|
] }),
|
|
725
|
-
/* @__PURE__ */ jsxs("footer", { style: { ...mutedStyle, fontSize: 11, lineHeight: 1.6, marginTop: 12 }, children: [
|
|
765
|
+
/* @__PURE__ */ jsxs("footer", { style: { ...mutedStyle, fontSize: 11, lineHeight: 1.6, marginTop: 12, flexShrink: 0 }, children: [
|
|
726
766
|
"Le assegnazioni progetto sono controllate con ",
|
|
727
767
|
/* @__PURE__ */ jsx("code", { children: "projectId" }),
|
|
728
768
|
" del run Paperclip e la allowlist degli agenti qui selezionati. Le informazioni restano separate per organizzazione. I namespace vengono creati da Supermemory al primo contenuto; disattivare un\u2019assegnazione revoca l\u2019accesso ma non cancella i documenti."
|