@dxos/plugin-search 0.8.4-main.67995b8 → 0.8.4-main.70d3990

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.
Files changed (83) hide show
  1. package/dist/lib/browser/{app-graph-builder-FLW7KDC5.mjs → app-graph-builder-BFLYNCSJ.mjs} +18 -16
  2. package/dist/lib/browser/app-graph-builder-BFLYNCSJ.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-GN2FSWTM.mjs +22 -0
  4. package/dist/lib/browser/chunk-GN2FSWTM.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-BXSF7IAU.mjs → chunk-MBISM5WN.mjs} +111 -10
  6. package/dist/lib/browser/chunk-MBISM5WN.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-JVMYGOKS.mjs → chunk-TCVYYI44.mjs} +5 -5
  8. package/dist/lib/browser/chunk-TCVYYI44.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +13 -13
  10. package/dist/lib/browser/index.mjs.map +3 -3
  11. package/dist/lib/browser/intent-resolver-UYQA6UUQ.mjs +22 -0
  12. package/dist/lib/browser/{intent-resolver-JPBGEKFT.mjs.map → intent-resolver-UYQA6UUQ.mjs.map} +3 -3
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/react-surface-D7STUIQS.mjs +306 -0
  15. package/dist/lib/browser/react-surface-D7STUIQS.mjs.map +7 -0
  16. package/dist/types/src/SearchPlugin.d.ts +1 -1
  17. package/dist/types/src/SearchPlugin.d.ts.map +1 -1
  18. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  19. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  20. package/dist/types/src/capabilities/index.d.ts +3 -3
  21. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  22. package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
  23. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  25. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  26. package/dist/types/src/components/Search.stories.d.ts +13 -12
  27. package/dist/types/src/components/Search.stories.d.ts.map +1 -1
  28. package/dist/types/src/components/SearchDialog.d.ts +1 -1
  29. package/dist/types/src/components/SearchDialog.d.ts.map +1 -1
  30. package/dist/types/src/components/SearchMain.d.ts +4 -5
  31. package/dist/types/src/components/SearchMain.d.ts.map +1 -1
  32. package/dist/types/src/components/SearchResults/SearchResults.d.ts +9 -9
  33. package/dist/types/src/components/SearchResults/SearchResults.d.ts.map +1 -1
  34. package/dist/types/src/components/SearchResults/SearchResults.stories.d.ts +12 -8
  35. package/dist/types/src/components/SearchResults/SearchResults.stories.d.ts.map +1 -1
  36. package/dist/types/src/components/Searchbar/Searchbar.d.ts +5 -9
  37. package/dist/types/src/components/Searchbar/Searchbar.d.ts.map +1 -1
  38. package/dist/types/src/components/Searchbar/Searchbar.stories.d.ts +10 -8
  39. package/dist/types/src/components/Searchbar/Searchbar.stories.d.ts.map +1 -1
  40. package/dist/types/src/hooks/index.d.ts +1 -0
  41. package/dist/types/src/hooks/index.d.ts.map +1 -1
  42. package/dist/types/src/hooks/sync.d.ts.map +1 -1
  43. package/dist/types/src/hooks/useGlobalSearch.d.ts.map +1 -1
  44. package/dist/types/src/hooks/useWebSearch.d.ts.map +1 -1
  45. package/dist/types/src/meta.d.ts +1 -2
  46. package/dist/types/src/meta.d.ts.map +1 -1
  47. package/dist/types/src/search/exa.d.ts +1 -3
  48. package/dist/types/src/search/exa.d.ts.map +1 -1
  49. package/dist/types/src/translations.d.ts +1 -1
  50. package/dist/types/src/types/action.d.ts +3 -3
  51. package/dist/types/src/types/action.d.ts.map +1 -1
  52. package/dist/types/tsconfig.tsbuildinfo +1 -1
  53. package/package.json +41 -41
  54. package/src/SearchPlugin.tsx +43 -44
  55. package/src/capabilities/app-graph-builder.ts +16 -14
  56. package/src/capabilities/intent-resolver.ts +1 -1
  57. package/src/capabilities/react-surface.tsx +1 -4
  58. package/src/components/Search.stories.tsx +14 -16
  59. package/src/components/SearchDialog.tsx +23 -11
  60. package/src/components/SearchMain.tsx +20 -28
  61. package/src/components/SearchResults/SearchResults.stories.tsx +20 -18
  62. package/src/components/SearchResults/SearchResults.tsx +46 -49
  63. package/src/components/Searchbar/Searchbar.stories.tsx +8 -8
  64. package/src/components/Searchbar/Searchbar.tsx +39 -44
  65. package/src/hooks/index.ts +2 -0
  66. package/src/hooks/sync.test.ts +1 -1
  67. package/src/hooks/sync.ts +5 -4
  68. package/src/hooks/useGlobalSearch.tsx +3 -2
  69. package/src/hooks/useSearchResults.ts +4 -4
  70. package/src/hooks/useWebSearch.ts +3 -4
  71. package/src/meta.ts +8 -5
  72. package/src/search/exa.test.ts +8 -19
  73. package/src/search/exa.ts +131 -151
  74. package/src/translations.ts +1 -1
  75. package/src/types/action.tsx +3 -3
  76. package/dist/lib/browser/app-graph-builder-FLW7KDC5.mjs.map +0 -7
  77. package/dist/lib/browser/chunk-BXSF7IAU.mjs.map +0 -7
  78. package/dist/lib/browser/chunk-JVMYGOKS.mjs.map +0 -7
  79. package/dist/lib/browser/chunk-KNS62YL2.mjs +0 -20
  80. package/dist/lib/browser/chunk-KNS62YL2.mjs.map +0 -7
  81. package/dist/lib/browser/intent-resolver-JPBGEKFT.mjs +0 -22
  82. package/dist/lib/browser/react-surface-ETKK5YS3.mjs +0 -648
  83. package/dist/lib/browser/react-surface-ETKK5YS3.mjs.map +0 -7
@@ -4,12 +4,57 @@
4
4
 
5
5
  import React, { type FC, forwardRef } from 'react';
6
6
 
7
+ import { Surface } from '@dxos/app-framework/react';
8
+ import { Obj } from '@dxos/echo';
7
9
  import { Card } from '@dxos/react-ui-stack';
8
10
  import { ghostHover } from '@dxos/react-ui-theme';
9
11
 
10
- import { SEARCH_RESULT } from '../../meta';
11
12
  import { type SearchResult } from '../../types';
12
13
 
14
+ export type SearchResultsProps = {
15
+ items: SearchResult[];
16
+ match?: RegExp;
17
+ selected?: string;
18
+ onSelect?: (id: string) => void;
19
+ };
20
+
21
+ // TODO(burdon): Key cursor up/down.
22
+ // TODO(burdon): Use stack (should be virtualized).
23
+ export const SearchResults = ({ items }: SearchResultsProps) => {
24
+ return (
25
+ <div className='overflow-y-auto'>
26
+ <div className='flex flex-col'>
27
+ {items
28
+ // TODO(burdon): Hack to reduce noise from system objects.
29
+ .filter((item) => Obj.getLabel(item.object))
30
+ .map((item) => (
31
+ <div key={item.id} role='none' className='pli-2 first:pbs-2 pbe-2'>
32
+ <Surface role='card' data={{ subject: item.object }} limit={1} />
33
+ </div>
34
+ ))}
35
+ </div>
36
+ </div>
37
+ );
38
+ };
39
+
40
+ export type SearchItemProps = SearchResult & { selected: boolean } & Pick<SearchResultsProps, 'onSelect'>;
41
+
42
+ export const SearchItem = forwardRef<HTMLDivElement, SearchItemProps>((item, forwardRef) => {
43
+ const { id, objectType, label, snippet, match, selected, onSelect } = item;
44
+
45
+ return (
46
+ <Card.StaticRoot
47
+ ref={forwardRef}
48
+ classNames={['mx-2 mt-2 cursor-pointer', selected && '!bg-activeSurface', ghostHover]}
49
+ onClick={() => onSelect?.(id)}
50
+ >
51
+ {objectType && <div className='text-xs text-neutral-400 ml-4'>{objectType}</div>}
52
+ <Card.Heading>{label ?? 'Untitled'}</Card.Heading>
53
+ {snippet && <Snippet text={snippet} match={match} />}
54
+ </Card.StaticRoot>
55
+ );
56
+ });
57
+
13
58
  export const Snippet: FC<{ text: string; match?: RegExp }> = ({ text, match }) => {
14
59
  let content = <>{text}</>;
15
60
  if (match) {
@@ -36,51 +81,3 @@ export const Snippet: FC<{ text: string; match?: RegExp }> = ({ text, match }) =
36
81
 
37
82
  return <span className='text-xs mb-1 line-clamp-3 text-neutral-300'>{content}</span>;
38
83
  };
39
-
40
- export type SearchItemProps = SearchResult & { selected: boolean } & Pick<SearchResultsProps, 'onSelect'>;
41
-
42
- export const SearchItem = forwardRef<HTMLDivElement, SearchItemProps>((item, forwardRef) => {
43
- const { id, objectType, label, snippet, match, selected, onSelect } = item;
44
-
45
- return (
46
- <Card.StaticRoot
47
- ref={forwardRef}
48
- classNames={['mx-2 mt-2 cursor-pointer', selected && '!bg-activeSurface', ghostHover]}
49
- onClick={() => onSelect?.(id)}
50
- >
51
- {objectType && (
52
- <>
53
- <div className='text-xs text-neutral-400 ml-4'>{objectType}</div>
54
- </>
55
- )}
56
- <Card.Heading>{label ?? 'Untitled'}</Card.Heading>
57
- {snippet && <Snippet text={snippet} match={match} />}
58
- </Card.StaticRoot>
59
- );
60
- });
61
-
62
- export type SearchResultsProps = {
63
- match?: RegExp;
64
- items: SearchResult[];
65
- selected?: string;
66
- onSelect?: (id: string) => void;
67
- };
68
-
69
- // TODO(burdon): Key cursor up/down.
70
- export const SearchResults = ({ items, selected, onSelect }: SearchResultsProps) => {
71
- return (
72
- <div className='flex flex-col grow overflow-y-auto'>
73
- <div className='flex flex-col'>
74
- {items.map((item) => (
75
- <SearchItem
76
- key={item.id}
77
- type={SEARCH_RESULT}
78
- {...item}
79
- onSelect={onSelect}
80
- selected={selected === item.id}
81
- />
82
- ))}
83
- </div>
84
- </div>
85
- );
86
- };
@@ -2,26 +2,26 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
 
7
- import { type Meta } from '@storybook/react-vite';
7
+ import { withTheme } from '@dxos/react-ui/testing';
8
8
 
9
- import { withTheme } from '@dxos/storybook-utils';
9
+ import { Searchbar } from './Searchbar';
10
10
 
11
- import { Searchbar, type SearchbarProps } from './Searchbar';
12
-
13
- const meta: Meta<SearchbarProps> = {
11
+ const meta = {
14
12
  title: 'plugins/plugin-search/Searchbar',
15
13
  component: Searchbar,
16
14
  decorators: [withTheme],
17
15
  parameters: {
18
16
  layout: 'centered',
19
17
  },
20
- };
18
+ } satisfies Meta<typeof Searchbar>;
21
19
 
22
20
  export default meta;
23
21
 
24
- export const Default = {
22
+ type Story = StoryObj<typeof meta>;
23
+
24
+ export const Default: Story = {
25
25
  args: {
26
26
  placeholder: 'Search...',
27
27
  },
@@ -2,66 +2,61 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import React, { type KeyboardEvent, useEffect, useRef, useState } from 'react';
5
+ import React, { useCallback, useEffect, useRef } from 'react';
6
6
 
7
- import { Input, type TextInputProps, Icon } from '@dxos/react-ui';
7
+ import { Input, type TextInputProps, type ThemedClassName, Toolbar, useControlledState } from '@dxos/react-ui';
8
8
 
9
- export type SearchbarProps = Pick<TextInputProps, 'variant' | 'placeholder'> & {
10
- classes?: {
11
- root?: string;
12
- input?: string;
13
- };
14
- value?: string;
15
- onChange?: (text?: string) => void;
16
- onSubmit?: (text?: string) => void;
17
- delay?: number;
18
- };
9
+ export type SearchbarProps = ThemedClassName<
10
+ Pick<TextInputProps, 'variant' | 'placeholder'> & {
11
+ delay?: number;
12
+ value?: string;
13
+ onChange?: (text?: string) => void;
14
+ onSubmit?: (text?: string) => void;
15
+ }
16
+ >;
19
17
 
20
- export const Searchbar = ({ classes, variant, placeholder, value, onChange, onSubmit }: SearchbarProps) => {
18
+ export const Searchbar = ({ classNames, variant, placeholder, value, onChange, onSubmit }: SearchbarProps) => {
19
+ const [text, setText] = useControlledState(value, onChange);
21
20
  const inputRef = useRef<HTMLInputElement>(null);
22
- const [text, setText] = useState(value);
23
- useEffect(() => {
24
- setText(value);
25
- }, [value]);
26
- const handleChange = (text?: string) => {
27
- setText(text);
28
- onChange?.(text);
29
- };
30
21
 
31
- const handleReset = () => {
32
- handleChange(undefined);
33
- inputRef.current?.focus();
34
- };
22
+ const handleWindowKeyDown = useCallback(
23
+ (event: KeyboardEvent) => {
24
+ if (event.key === 'f' && event.metaKey && event.shiftKey) {
25
+ inputRef.current?.focus();
26
+ }
27
+ },
28
+ [inputRef],
29
+ );
35
30
 
36
- const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {
37
- switch (event.key) {
38
- case 'Enter':
39
- onSubmit?.(text);
40
- break;
41
- case 'Escape':
42
- handleReset();
43
- break;
44
- }
45
- };
31
+ useEffect(() => {
32
+ window.addEventListener('keydown', handleWindowKeyDown);
33
+ return () => window.removeEventListener('keydown', handleWindowKeyDown);
34
+ }, [handleWindowKeyDown]);
35
+
36
+ const handleKeyDown = useCallback(
37
+ (event: React.KeyboardEvent<HTMLInputElement>) => {
38
+ switch (event.key) {
39
+ case 'Enter':
40
+ onSubmit?.(text);
41
+ break;
42
+ }
43
+ },
44
+ [text, onSubmit],
45
+ );
46
46
 
47
47
  return (
48
- <div className='flex shrink-0w-full items-center pli-1 pbs-1'>
48
+ <Toolbar.Root classNames={classNames}>
49
49
  <Input.Root>
50
50
  <Input.TextInput
51
51
  ref={inputRef}
52
52
  placeholder={placeholder}
53
+ autoFocus
53
54
  variant={variant}
54
55
  value={text ?? ''}
55
- classNames={['pl-3 pr-10', classes?.input]}
56
- onChange={({ target }) => handleChange(target.value)}
56
+ onChange={({ target }) => setText(target.value)}
57
57
  onKeyDown={handleKeyDown}
58
58
  />
59
-
60
- {/* TODO(burdon): Margin should be density specific. */}
61
- <div role='button' className='-ml-7 p-0 cursor-pointer' onClick={handleReset}>
62
- <Icon icon='ph--magnifying-glass--regular' size={5} />
63
- </div>
64
59
  </Input.Root>
65
- </div>
60
+ </Toolbar.Root>
66
61
  );
67
62
  };
@@ -3,5 +3,7 @@
3
3
  //
4
4
 
5
5
  export * from './sync';
6
+
6
7
  export * from './useGlobalSearch';
7
8
  export * from './useSearchResults';
9
+ export * from './useWebSearch';
@@ -5,7 +5,7 @@
5
5
  import { describe, expect, test } from 'vitest';
6
6
 
7
7
  import { Client } from '@dxos/client';
8
- import { Obj, Filter, Type } from '@dxos/echo';
8
+ import { Filter, Obj, Type } from '@dxos/echo';
9
9
  import { faker } from '@dxos/random';
10
10
 
11
11
  import { filterObjectsSync } from './sync';
package/src/hooks/sync.ts CHANGED
@@ -2,10 +2,11 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type Schema, SchemaAST } from 'effect';
5
+ import type * as Schema from 'effect/Schema';
6
+ import * as SchemaAST from 'effect/SchemaAST';
6
7
 
7
8
  import { Obj } from '@dxos/echo';
8
- import { DataType } from '@dxos/schema';
9
+ import { Text } from '@dxos/schema';
9
10
 
10
11
  import { type SearchResult } from '../types';
11
12
 
@@ -45,7 +46,7 @@ export const filterObjectsSync = <T extends Record<string, any>>(objects: T[], m
45
46
 
46
47
  return objects.reduce<SearchResult[]>((results, object) => {
47
48
  // TODO(burdon): Hack to ignore Text objects.
48
- if (object instanceof DataType.Text) {
49
+ if (object instanceof Text.Text) {
49
50
  return results;
50
51
  }
51
52
 
@@ -111,7 +112,7 @@ const getKeys = (object: Record<string, unknown>): string[] => {
111
112
  export const mapObjectToTextFields = <T extends Record<string, unknown>>(object: T): TextFields => {
112
113
  return getKeys(object).reduce<TextFields>((fields, key) => {
113
114
  const value = object[key] as any;
114
- if (typeof value === 'string' || value instanceof DataType.Text) {
115
+ if (typeof value === 'string' || value instanceof Text.Text) {
115
116
  try {
116
117
  fields[key] = String(value);
117
118
  } catch (err) {
@@ -2,13 +2,14 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import React, { createContext, type PropsWithChildren, useContext, useMemo, useState } from 'react';
5
+ import React, { type PropsWithChildren, createContext, useContext, useMemo, useState } from 'react';
6
6
 
7
7
  import { raise } from '@dxos/debug';
8
8
 
9
- import { filterObjectsSync, queryStringToMatch } from './sync';
10
9
  import { type SearchResult } from '../types';
11
10
 
11
+ import { filterObjectsSync, queryStringToMatch } from './sync';
12
+
12
13
  type SearchContextType = {
13
14
  match?: RegExp;
14
15
  setMatch?: (text?: string) => void;
@@ -5,7 +5,7 @@
5
5
  import { yieldOrContinue } from 'main-thread-scheduling';
6
6
  import { useEffect, useState } from 'react';
7
7
 
8
- import { DataType } from '@dxos/schema';
8
+ import { Text } from '@dxos/schema';
9
9
 
10
10
  // TODO(thure): Deprecate search-sync, move still-relevant utilities elsewhere (here, probably).
11
11
  import { mapObjectToTextFields, queryStringToMatch } from './sync';
@@ -20,7 +20,7 @@ export const filterObjects = async <T extends Record<string, any>>(
20
20
  }
21
21
  await Promise.all(
22
22
  objects
23
- .filter((object) => !(object instanceof DataType.Text))
23
+ .filter((object) => !(object instanceof Text.Text))
24
24
  .map(async (object) => {
25
25
  await yieldOrContinue('interactive');
26
26
  const fields = mapObjectToTextFields<T>(object);
@@ -47,14 +47,14 @@ export const useSearchResults = <T extends Record<string, any>>(
47
47
 
48
48
  useEffect(() => {
49
49
  setPending(!!(objects && queryString));
50
- const timeoutId = setTimeout(async () => {
50
+ const timeout = setTimeout(async () => {
51
51
  const nextResults =
52
52
  objects && queryString ? await filterObjects(objects, queryStringToMatch(queryString)) : new Map();
53
53
  setResults(nextResults);
54
54
  setPending(false);
55
55
  }, delay);
56
56
 
57
- return () => clearTimeout(timeoutId);
57
+ return () => clearTimeout(timeout);
58
58
  }, [queryString, objects]);
59
59
 
60
60
  return [pending, results];
@@ -5,15 +5,15 @@
5
5
  import { useState } from 'react';
6
6
 
7
7
  import { EXA_API_KEY } from '@dxos/ai/testing';
8
- import { todo } from '@dxos/debug';
9
8
  import { Obj } from '@dxos/echo';
10
9
  import { type DXN } from '@dxos/keys';
11
10
  import { log } from '@dxos/log';
12
11
  import { getIconAnnotation } from '@dxos/schema';
13
- import { Testing } from '@dxos/schema/testing';
12
+ import { TestSchema } from '@dxos/schema/testing';
14
13
 
15
14
  import { search } from '../search';
16
15
  import { type SearchResult } from '../types';
16
+
17
17
  import { getStringProperty } from './sync';
18
18
 
19
19
  export const useWebSearch = ({ query, context }: { query?: string; context?: string }) => {
@@ -27,8 +27,7 @@ export const useWebSearch = ({ query, context }: { query?: string; context?: str
27
27
  const results = await search({
28
28
  query,
29
29
  context,
30
- schema: [Testing.Project, Testing.Organization, Testing.Contact],
31
- AiService: todo(),
30
+ schema: [TestSchema.Project, TestSchema.Organization, TestSchema.Person],
32
31
  exaApiKey: EXA_API_KEY,
33
32
  });
34
33
 
package/src/meta.ts CHANGED
@@ -3,15 +3,18 @@
3
3
  //
4
4
 
5
5
  import { type PluginMeta } from '@dxos/app-framework';
6
-
7
- export const SEARCH_PLUGIN = 'dxos.org/plugin/search';
8
- export const SEARCH_RESULT = `${SEARCH_PLUGIN}/result`;
6
+ import { trim } from '@dxos/util';
9
7
 
10
8
  export const meta: PluginMeta = {
11
- id: SEARCH_PLUGIN,
9
+ id: 'dxos.org/plugin/search',
12
10
  name: 'Search',
13
- description: 'Search ECHO spaces for content.',
11
+ description: trim`
12
+ Full-text search engine for finding content across all spaces and object types.
13
+ Quickly locate documents, tables, and other objects with instant results and relevance ranking.
14
+ `,
14
15
  icon: 'ph--magnifying-glass--regular',
15
16
  source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-search',
16
17
  tags: ['labs'],
17
18
  };
19
+
20
+ export const SEARCH_RESULT = `${meta.id}/result`;
@@ -5,9 +5,8 @@
5
5
  import { describe, test } from 'vitest';
6
6
 
7
7
  import { EXA_API_KEY } from '@dxos/ai/testing';
8
- import { todo } from '@dxos/debug';
9
8
  import { log } from '@dxos/log';
10
- import { Testing } from '@dxos/schema/testing';
9
+ import { TestSchema } from '@dxos/schema/testing';
11
10
 
12
11
  import { search } from './exa';
13
12
 
@@ -16,8 +15,7 @@ describe.skip('Search', () => {
16
15
  test.skip('contacts', { timeout: 60_000 }, async () => {
17
16
  const objects = await search({
18
17
  query: 'top executives at google',
19
- schema: [Testing.Contact],
20
- AiService: null as any, // TODO: Implement AiService
18
+ schema: [TestSchema.Person],
21
19
  exaApiKey: EXA_API_KEY,
22
20
  });
23
21
 
@@ -27,8 +25,7 @@ describe.skip('Search', () => {
27
25
  test.skip('contacts projects and orgs', { timeout: 60_000 }, async () => {
28
26
  const objects = await search({
29
27
  query: 'top executives at google',
30
- schema: [Testing.Contact, Testing.Project, Testing.Organization],
31
- AiService: todo(),
28
+ schema: [TestSchema.Person, TestSchema.Project, TestSchema.Organization],
32
29
  exaApiKey: EXA_API_KEY,
33
30
  });
34
31
 
@@ -38,8 +35,7 @@ describe.skip('Search', () => {
38
35
  test('a19z org, projects they invest in and team', { timeout: 60_000 }, async () => {
39
36
  const objects = await search({
40
37
  query: 'a19z org, projects they invest in and team',
41
- schema: [Testing.Project, Testing.Organization, Testing.Contact],
42
- AiService: todo(),
38
+ schema: [TestSchema.Project, TestSchema.Organization, TestSchema.Person],
43
39
  exaApiKey: EXA_API_KEY,
44
40
  });
45
41
 
@@ -49,8 +45,7 @@ describe.skip('Search', () => {
49
45
  test('companies building CRDTs', { timeout: 60_000 }, async () => {
50
46
  const objects = await search({
51
47
  query: 'companies building CRDTs',
52
- schema: [Testing.Project, Testing.Organization, Testing.Contact],
53
- AiService: todo(),
48
+ schema: [TestSchema.Project, TestSchema.Organization, TestSchema.Person],
54
49
  exaApiKey: EXA_API_KEY,
55
50
  });
56
51
 
@@ -62,8 +57,7 @@ describe.skip('Search', () => {
62
57
  test('composer context-based search', { timeout: 60_000 }, async () => {
63
58
  const objects = await search({
64
59
  context: COMPOSER_DXOS_DOC,
65
- schema: [Testing.Project, Testing.Organization, Testing.Contact],
66
- AiService: todo(),
60
+ schema: [TestSchema.Project, TestSchema.Organization, TestSchema.Person],
67
61
  exaApiKey: EXA_API_KEY,
68
62
  });
69
63
 
@@ -73,8 +67,7 @@ describe.skip('Search', () => {
73
67
  test.only('edge architecture', { timeout: 60_000 }, async () => {
74
68
  const objects = await search({
75
69
  context: EDGE_ARCHITECTURE_DOC,
76
- schema: [Testing.Project, Testing.Organization, Testing.Contact],
77
- AiService: todo(),
70
+ schema: [TestSchema.Project, TestSchema.Organization, TestSchema.Person],
78
71
  exaApiKey: EXA_API_KEY,
79
72
  });
80
73
 
@@ -83,9 +76,7 @@ describe.skip('Search', () => {
83
76
  });
84
77
  });
85
78
 
86
- // TODO(dmaretskyi): Import as txt.
87
79
  const COMPOSER_DXOS_DOC = `
88
-
89
80
  ![img](https://dxos.network/dxos-logotype-blue.png)
90
81
  # Welcome to Composer by DXOS
91
82
 
@@ -93,7 +84,7 @@ const COMPOSER_DXOS_DOC = `
93
84
 
94
85
  Composer is an extensible application that includes familiar components such as documents, diagrams, and tables. It leverages DXOS — a full stack framework for building collaborative local-first applications.
95
86
 
96
- With our upcoming SDK, you'll be able to build custom plugins, leverage external APIs and integrate with LLMs. All inside of a private collaborative workspace.
87
+ With our SDK, you'll be able to build custom plugins, leverage external APIs and integrate with LLMs. All inside of a private collaborative workspace.
97
88
 
98
89
  ## Disclaimer
99
90
 
@@ -219,6 +210,4 @@ const EDGE_ARCHITECTURE_DOC = `
219
210
  - given the fq id of the deployment object, anyone in the space should be able to invoke the function even if they don't have access to the object itself
220
211
 
221
212
  ### Service Side
222
-
223
-
224
213
  `;