@arbidocs/react 0.3.138 → 0.3.140

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/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkZBZKHBDS_cjs = require('./chunk-ZBZKHBDS.cjs');
4
3
  var chunkZMTLGO3K_cjs = require('./chunk-ZMTLGO3K.cjs');
4
+ var chunkZBZKHBDS_cjs = require('./chunk-ZBZKHBDS.cjs');
5
5
  var React2 = require('react');
6
6
  var reactQuery = require('@tanstack/react-query');
7
7
  var jsxRuntime = require('react/jsx-runtime');
@@ -594,7 +594,7 @@ var arbiQueryKeys = {
594
594
  sessions: () => ["arbi", "sessions"],
595
595
  health: () => ["arbi", "health"],
596
596
  tasks: () => ["arbi", "tasks"],
597
- memories: (workspaceId) => ["arbi", "memories", workspaceId],
597
+ notes: (workspaceId) => ["arbi", "notes", workspaceId],
598
598
  configs: () => ["arbi", "configs"],
599
599
  activity: () => ["arbi", "activity"],
600
600
  projects: () => ["arbi", "projects"],
@@ -699,8 +699,8 @@ function useTasks(options) {
699
699
  function useMemories(workspaceId, options) {
700
700
  const arbi = chunkZMTLGO3K_cjs.useArbi();
701
701
  return reactQuery.useQuery({
702
- queryKey: arbiQueryKeys.memories(workspaceId ?? ""),
703
- queryFn: () => arbi.memory.list({ pinnedOnly: options?.pinnedOnly }),
702
+ queryKey: arbiQueryKeys.notes(workspaceId ?? ""),
703
+ queryFn: () => arbi.notes.list({ pinnedOnly: options?.pinnedOnly }),
704
704
  enabled: (options?.enabled ?? true) && !!workspaceId && arbi.hasWorkspace
705
705
  });
706
706
  }
@@ -2553,18 +2553,15 @@ function DocumentReview({
2553
2553
  const list = [];
2554
2554
  const chunkTag = /* @__PURE__ */ new Map();
2555
2555
  for (const dt of doc?.doctags ?? []) {
2556
- const citations = dt.citations ?? {};
2557
- for (const [citId, cit] of Object.entries(citations)) {
2558
- const chunkIds = cit?.chunk_ids ?? [];
2559
- if (chunkIds.length === 0) continue;
2560
- list.push({
2561
- key: `${dt.tag_ext_id}:${citId}`,
2562
- tagExtId: dt.tag_ext_id,
2563
- statement: cit.statement,
2564
- chunkIds
2565
- });
2566
- for (const cid of chunkIds) if (!chunkTag.has(cid)) chunkTag.set(cid, dt.tag_ext_id);
2567
- }
2556
+ const chunkIds = dt.citations?.passages?.map((p) => p.chunk_id) ?? [];
2557
+ if (chunkIds.length === 0) continue;
2558
+ list.push({
2559
+ key: dt.tag_ext_id,
2560
+ tagExtId: dt.tag_ext_id,
2561
+ statement: dt.note ?? "",
2562
+ chunkIds
2563
+ });
2564
+ for (const cid of chunkIds) if (!chunkTag.has(cid)) chunkTag.set(cid, dt.tag_ext_id);
2568
2565
  }
2569
2566
  return { findings: list, chunkToTag: chunkTag };
2570
2567
  }, [doc?.doctags]);
@@ -4643,6 +4640,20 @@ var ENTITY_MAPPINGS = {
4643
4640
  NEW: lucideReact.StickyNote
4644
4641
  }
4645
4642
  },
4643
+ // Workspace knowledge the assistant retains and recalls — durable free text,
4644
+ // optionally grounded in source passages. Distinct from ANNOTATION, which is
4645
+ // attached TO a document field; a NOTE is workspace-scoped and stands alone.
4646
+ // Stored server-side as `memories` (mem-*); "Note" is the user-facing name.
4647
+ NOTE: {
4648
+ NAMES: {
4649
+ SINGULAR: "Note",
4650
+ PLURAL: "Notes"
4651
+ },
4652
+ ICONS: {
4653
+ DEFAULT: lucideReact.NotebookText,
4654
+ NEW: lucideReact.NotebookPen
4655
+ }
4656
+ },
4646
4657
  USER: {
4647
4658
  NAMES: {
4648
4659
  SINGULAR: "User",
@@ -6736,6 +6747,14 @@ function DocumentGallery({
6736
6747
  );
6737
6748
  }
6738
6749
 
6750
+ Object.defineProperty(exports, "ArbiProvider", {
6751
+ enumerable: true,
6752
+ get: function () { return chunkZMTLGO3K_cjs.ArbiProvider; }
6753
+ });
6754
+ Object.defineProperty(exports, "useArbi", {
6755
+ enumerable: true,
6756
+ get: function () { return chunkZMTLGO3K_cjs.useArbi; }
6757
+ });
6739
6758
  Object.defineProperty(exports, "AiMarkdown", {
6740
6759
  enumerable: true,
6741
6760
  get: function () { return chunkZBZKHBDS_cjs.AiMarkdown; }
@@ -7160,14 +7179,6 @@ Object.defineProperty(exports, "toggleVariants", {
7160
7179
  enumerable: true,
7161
7180
  get: function () { return chunkZBZKHBDS_cjs.toggleVariants; }
7162
7181
  });
7163
- Object.defineProperty(exports, "ArbiProvider", {
7164
- enumerable: true,
7165
- get: function () { return chunkZMTLGO3K_cjs.ArbiProvider; }
7166
- });
7167
- Object.defineProperty(exports, "useArbi", {
7168
- enumerable: true,
7169
- get: function () { return chunkZMTLGO3K_cjs.useArbi; }
7170
- });
7171
7182
  Object.defineProperty(exports, "Arbi", {
7172
7183
  enumerable: true,
7173
7184
  get: function () { return browser.Arbi; }