@dxos/plugin-thread 0.8.2-main.2f9c567 → 0.8.2-main.5885341
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/lib/browser/{ChatContainer-UTQWOBXM.mjs → ChatContainer-WC6KQDDU.mjs} +5 -5
- package/dist/lib/browser/ChatContainer-WC6KQDDU.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-SQD3KQKB.mjs → app-graph-builder-6W4UKJDI.mjs} +2 -2
- package/dist/lib/browser/app-graph-builder-6W4UKJDI.mjs.map +7 -0
- package/dist/lib/browser/{chunk-32EIWOAL.mjs → chunk-AYNXYEKP.mjs} +1 -1
- package/dist/lib/browser/{chunk-32EIWOAL.mjs.map → chunk-AYNXYEKP.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-2E5LHYLQ.mjs → chunk-FY5OCUP6.mjs} +2 -2
- package/dist/lib/browser/chunk-FY5OCUP6.mjs.map +7 -0
- package/dist/lib/browser/chunk-Q66FBBJD.mjs +17 -0
- package/dist/lib/browser/chunk-WOG72DWE.mjs +93 -0
- package/dist/lib/browser/chunk-WOG72DWE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +8 -8
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-EDSAXXNW.mjs → intent-resolver-3UW6ROYT.mjs} +4 -4
- package/dist/lib/browser/intent-resolver-3UW6ROYT.mjs.map +7 -0
- package/dist/lib/browser/{markdown-M4QAJXHG.mjs → markdown-7KXBXCUS.mjs} +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-FUWNPSKX.mjs → react-surface-F2AIYIUH.mjs} +6 -6
- package/dist/lib/browser/{settings-SSYDISA6.mjs → settings-2VZ7S4SK.mjs} +2 -2
- package/dist/lib/browser/types.mjs +1 -1
- package/dist/lib/node/{ChatContainer-VO5B47V4.cjs → ChatContainer-LVYQ67PJ.cjs} +11 -11
- package/dist/lib/node/ChatContainer-LVYQ67PJ.cjs.map +7 -0
- package/dist/lib/node/{app-graph-builder-G45JDZWQ.cjs → app-graph-builder-HZNWT4QU.cjs} +5 -5
- package/dist/lib/node/app-graph-builder-HZNWT4QU.cjs.map +7 -0
- package/dist/lib/node/{chunk-HG7J3YR3.cjs → chunk-46BSFPBV.cjs} +44 -44
- package/dist/lib/node/chunk-46BSFPBV.cjs.map +7 -0
- package/dist/lib/node/{chunk-KYLJU47G.cjs → chunk-IX63EKGL.cjs} +9 -9
- package/dist/lib/node/{chunk-BUYO7P2A.cjs → chunk-RIYLEDQ7.cjs} +6 -6
- package/dist/lib/node/chunk-RIYLEDQ7.cjs.map +7 -0
- package/dist/lib/node/{chunk-NO6WQR36.cjs → chunk-W25MBII2.cjs} +4 -4
- package/dist/lib/node/{chunk-NO6WQR36.cjs.map → chunk-W25MBII2.cjs.map} +2 -2
- package/dist/lib/node/index.cjs +15 -15
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-ECFDZLCG.cjs → intent-resolver-DC6HDNTX.cjs} +15 -15
- package/dist/lib/node/intent-resolver-DC6HDNTX.cjs.map +7 -0
- package/dist/lib/node/{markdown-G5NDD5EJ.cjs → markdown-L2WMCQKM.cjs} +7 -7
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-G7GXAK5G.cjs → react-surface-GP5IH5LN.cjs} +17 -17
- package/dist/lib/node/{settings-PV6MGI52.cjs → settings-7MGTJ46L.cjs} +6 -6
- package/dist/lib/node/types.cjs +3 -3
- package/dist/lib/node/types.cjs.map +1 -1
- package/dist/lib/node-esm/{ChatContainer-IAX56SIL.mjs → ChatContainer-WMOPMK5H.mjs} +5 -5
- package/dist/lib/node-esm/ChatContainer-WMOPMK5H.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-25K4ELOR.mjs → app-graph-builder-M3KK5QJH.mjs} +2 -2
- package/dist/lib/node-esm/app-graph-builder-M3KK5QJH.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-CBAEGDBZ.mjs → chunk-7DOPZH6Y.mjs} +2 -2
- package/dist/lib/{browser/chunk-2E5LHYLQ.mjs.map → node-esm/chunk-7DOPZH6Y.mjs.map} +2 -2
- package/dist/lib/node-esm/chunk-E446MGLP.mjs +94 -0
- package/dist/lib/node-esm/chunk-E446MGLP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-QUTIMZJ4.mjs +19 -0
- package/dist/lib/node-esm/{chunk-IZWN4KAY.mjs → chunk-T6E5EY7Z.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-IZWN4KAY.mjs.map → chunk-T6E5EY7Z.mjs.map} +2 -2
- package/dist/lib/node-esm/index.mjs +8 -8
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-GHN5XIMY.mjs → intent-resolver-OAMDKGAA.mjs} +4 -4
- package/dist/lib/node-esm/intent-resolver-OAMDKGAA.mjs.map +7 -0
- package/dist/lib/node-esm/{markdown-WMR5AZRI.mjs → markdown-ZKU23UVD.mjs} +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-FSBMYEZJ.mjs → react-surface-45GRKLWG.mjs} +6 -6
- package/dist/lib/node-esm/{settings-TJ53GIH3.mjs → settings-AJAZ3O47.mjs} +2 -2
- package/dist/lib/node-esm/types.mjs +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/components/MessageContainer.d.ts +4 -5
- package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +51 -48
- package/dist/types/src/components/testing.d.ts.map +1 -1
- package/dist/types/src/components/types.d.ts +2 -2
- package/dist/types/src/components/types.d.ts.map +1 -1
- package/dist/types/src/hooks/analytics.d.ts +2 -2
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +57 -218
- package/dist/types/src/types.d.ts.map +1 -1
- package/package.json +33 -35
- package/src/ThreadPlugin.tsx +7 -7
- package/src/capabilities/app-graph-builder.ts +3 -3
- package/src/capabilities/intent-resolver.ts +2 -2
- package/src/components/Chat.stories.tsx +2 -2
- package/src/components/ChatContainer.tsx +3 -3
- package/src/components/Comments.stories.tsx +2 -2
- package/src/components/MessageContainer.tsx +12 -9
- package/src/components/testing.ts +2 -2
- package/src/components/types.ts +2 -2
- package/src/hooks/analytics.ts +2 -6
- package/src/types.ts +40 -40
- package/dist/lib/browser/ChatContainer-UTQWOBXM.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-SQD3KQKB.mjs.map +0 -7
- package/dist/lib/browser/chunk-AM4MYXGU.mjs +0 -93
- package/dist/lib/browser/chunk-AM4MYXGU.mjs.map +0 -7
- package/dist/lib/browser/chunk-UT6IV2FX.mjs +0 -17
- package/dist/lib/browser/intent-resolver-EDSAXXNW.mjs.map +0 -7
- package/dist/lib/node/ChatContainer-VO5B47V4.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-G45JDZWQ.cjs.map +0 -7
- package/dist/lib/node/chunk-BUYO7P2A.cjs.map +0 -7
- package/dist/lib/node/chunk-HG7J3YR3.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-ECFDZLCG.cjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-IAX56SIL.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-25K4ELOR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CBAEGDBZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KUQP2ES3.mjs +0 -19
- package/dist/lib/node-esm/chunk-XTZJQJY4.mjs +0 -94
- package/dist/lib/node-esm/chunk-XTZJQJY4.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-GHN5XIMY.mjs.map +0 -7
- /package/dist/lib/browser/{chunk-UT6IV2FX.mjs.map → chunk-Q66FBBJD.mjs.map} +0 -0
- /package/dist/lib/browser/{markdown-M4QAJXHG.mjs.map → markdown-7KXBXCUS.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-FUWNPSKX.mjs.map → react-surface-F2AIYIUH.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-SSYDISA6.mjs.map → settings-2VZ7S4SK.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-KYLJU47G.cjs.map → chunk-IX63EKGL.cjs.map} +0 -0
- /package/dist/lib/node/{markdown-G5NDD5EJ.cjs.map → markdown-L2WMCQKM.cjs.map} +0 -0
- /package/dist/lib/node/{react-surface-G7GXAK5G.cjs.map → react-surface-GP5IH5LN.cjs.map} +0 -0
- /package/dist/lib/node/{settings-PV6MGI52.cjs.map → settings-7MGTJ46L.cjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-KUQP2ES3.mjs.map → chunk-QUTIMZJ4.mjs.map} +0 -0
- /package/dist/lib/node-esm/{markdown-WMR5AZRI.mjs.map → markdown-ZKU23UVD.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-FSBMYEZJ.mjs.map → react-surface-45GRKLWG.mjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-TJ53GIH3.mjs.map → settings-AJAZ3O47.mjs.map} +0 -0
|
@@ -1,73 +1,74 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S } from '@dxos/echo-schema';
|
|
2
2
|
import { ChannelType, ThreadType } from '@dxos/plugin-space/types';
|
|
3
|
+
import { MessageType } from '@dxos/schema';
|
|
3
4
|
export declare namespace ThreadAction {
|
|
4
|
-
const CreateChannel_base:
|
|
5
|
-
readonly _tag:
|
|
5
|
+
const CreateChannel_base: S.TaggedClass<CreateChannel, "dxos.org/plugin/thread/action/create-channel", {
|
|
6
|
+
readonly _tag: S.tag<"dxos.org/plugin/thread/action/create-channel">;
|
|
6
7
|
} & {
|
|
7
|
-
input:
|
|
8
|
-
spaceId:
|
|
9
|
-
name:
|
|
8
|
+
input: S.Struct<{
|
|
9
|
+
spaceId: typeof S.String;
|
|
10
|
+
name: S.optional<typeof S.String>;
|
|
10
11
|
}>;
|
|
11
|
-
output:
|
|
12
|
+
output: S.Struct<{
|
|
12
13
|
object: typeof ChannelType;
|
|
13
14
|
}>;
|
|
14
15
|
}>;
|
|
15
16
|
export class CreateChannel extends CreateChannel_base {
|
|
16
17
|
}
|
|
17
|
-
const Create_base:
|
|
18
|
-
readonly _tag:
|
|
18
|
+
const Create_base: S.TaggedClass<Create, "dxos.org/plugin/thread/action/create", {
|
|
19
|
+
readonly _tag: S.tag<"dxos.org/plugin/thread/action/create">;
|
|
19
20
|
} & {
|
|
20
|
-
input:
|
|
21
|
-
name:
|
|
22
|
-
cursor: typeof
|
|
23
|
-
subject:
|
|
21
|
+
input: S.Struct<{
|
|
22
|
+
name: S.optional<typeof S.String>;
|
|
23
|
+
cursor: typeof S.String;
|
|
24
|
+
subject: S.Schema<any, any, never>;
|
|
24
25
|
}>;
|
|
25
|
-
output:
|
|
26
|
+
output: S.Struct<{
|
|
26
27
|
object: typeof ThreadType;
|
|
27
28
|
}>;
|
|
28
29
|
}>;
|
|
29
30
|
export class Create extends Create_base {
|
|
30
31
|
}
|
|
31
|
-
const
|
|
32
|
-
readonly _tag:
|
|
32
|
+
const Select_base: S.TaggedClass<Select, "dxos.org/plugin/thread/action/select", {
|
|
33
|
+
readonly _tag: S.tag<"dxos.org/plugin/thread/action/select">;
|
|
33
34
|
} & {
|
|
34
|
-
input:
|
|
35
|
-
|
|
36
|
-
subject: Schema.Schema<any, any, never>;
|
|
37
|
-
cursor: Schema.optional<typeof Schema.String>;
|
|
35
|
+
input: S.Struct<{
|
|
36
|
+
current: typeof S.String;
|
|
38
37
|
}>;
|
|
39
|
-
output: typeof
|
|
38
|
+
output: typeof S.Void;
|
|
40
39
|
}>;
|
|
41
|
-
export class
|
|
40
|
+
export class Select extends Select_base {
|
|
42
41
|
}
|
|
43
|
-
const
|
|
44
|
-
readonly _tag:
|
|
42
|
+
const ToggleResolved_base: S.TaggedClass<ToggleResolved, "dxos.org/plugin/thread/action/toggle-resolved", {
|
|
43
|
+
readonly _tag: S.tag<"dxos.org/plugin/thread/action/toggle-resolved">;
|
|
45
44
|
} & {
|
|
46
|
-
input:
|
|
47
|
-
|
|
45
|
+
input: S.Struct<{
|
|
46
|
+
thread: typeof ThreadType;
|
|
48
47
|
}>;
|
|
49
|
-
output: typeof
|
|
48
|
+
output: typeof S.Void;
|
|
50
49
|
}>;
|
|
51
|
-
export class
|
|
50
|
+
export class ToggleResolved extends ToggleResolved_base {
|
|
52
51
|
}
|
|
53
|
-
const
|
|
54
|
-
readonly _tag:
|
|
52
|
+
const Delete_base: S.TaggedClass<Delete, "dxos.org/plugin/thread/action/delete", {
|
|
53
|
+
readonly _tag: S.tag<"dxos.org/plugin/thread/action/delete">;
|
|
55
54
|
} & {
|
|
56
|
-
input:
|
|
55
|
+
input: S.Struct<{
|
|
57
56
|
thread: typeof ThreadType;
|
|
57
|
+
subject: S.Schema<any, any, never>;
|
|
58
|
+
cursor: S.optional<typeof S.String>;
|
|
58
59
|
}>;
|
|
59
|
-
output: typeof
|
|
60
|
+
output: typeof S.Void;
|
|
60
61
|
}>;
|
|
61
|
-
export class
|
|
62
|
+
export class Delete extends Delete_base {
|
|
62
63
|
}
|
|
63
|
-
const AddMessage_base:
|
|
64
|
-
readonly _tag:
|
|
64
|
+
const AddMessage_base: S.TaggedClass<AddMessage, "dxos.org/plugin/thread/action/add-message", {
|
|
65
|
+
readonly _tag: S.tag<"dxos.org/plugin/thread/action/add-message">;
|
|
65
66
|
} & {
|
|
66
|
-
input:
|
|
67
|
-
subject:
|
|
67
|
+
input: S.Struct<{
|
|
68
|
+
subject: S.Schema<any, any, never>;
|
|
68
69
|
thread: typeof ThreadType;
|
|
69
|
-
sender:
|
|
70
|
-
contact:
|
|
70
|
+
sender: S.Struct<{
|
|
71
|
+
contact: S.optional<import("@dxos/echo-schema").Ref$<{
|
|
71
72
|
readonly id: string;
|
|
72
73
|
fields?: {
|
|
73
74
|
readonly value: string;
|
|
@@ -181,198 +182,36 @@ export declare namespace ThreadAction {
|
|
|
181
182
|
};
|
|
182
183
|
} | undefined;
|
|
183
184
|
}>>;
|
|
184
|
-
identityDid:
|
|
185
|
-
identityKey:
|
|
186
|
-
email:
|
|
187
|
-
name:
|
|
188
|
-
role:
|
|
185
|
+
identityDid: S.optional<typeof S.String>;
|
|
186
|
+
identityKey: S.optional<typeof S.String>;
|
|
187
|
+
email: S.optional<typeof S.String>;
|
|
188
|
+
name: S.optional<typeof S.String>;
|
|
189
|
+
role: S.optional<S.Literal<["user", "assistant"]>>;
|
|
189
190
|
}>;
|
|
190
|
-
text: typeof
|
|
191
|
+
text: typeof S.String;
|
|
191
192
|
}>;
|
|
192
|
-
output: typeof
|
|
193
|
+
output: typeof S.Void;
|
|
193
194
|
}>;
|
|
194
195
|
export class AddMessage extends AddMessage_base {
|
|
195
196
|
}
|
|
196
|
-
const DeleteMessage_base:
|
|
197
|
-
readonly _tag:
|
|
197
|
+
const DeleteMessage_base: S.TaggedClass<DeleteMessage, "dxos.org/plugin/thread/action/delete-message", {
|
|
198
|
+
readonly _tag: S.tag<"dxos.org/plugin/thread/action/delete-message">;
|
|
198
199
|
} & {
|
|
199
|
-
input:
|
|
200
|
+
input: S.Struct<{
|
|
200
201
|
thread: typeof ThreadType;
|
|
201
|
-
subject:
|
|
202
|
-
messageId: typeof
|
|
203
|
-
message:
|
|
204
|
-
|
|
205
|
-
created: import("effect/Schema").SchemaClass<string, string, never>;
|
|
206
|
-
sender: import("effect/Schema").mutable<import("effect/Schema").Struct<{
|
|
207
|
-
contact: import("effect/Schema").optional<import("@dxos/echo-schema").Ref$<{
|
|
208
|
-
readonly id: string;
|
|
209
|
-
fields?: {
|
|
210
|
-
readonly value: string;
|
|
211
|
-
readonly label: string;
|
|
212
|
-
readonly category?: string | undefined;
|
|
213
|
-
}[] | undefined;
|
|
214
|
-
organization?: import("@dxos/echo-schema").Ref<{
|
|
215
|
-
readonly id: string;
|
|
216
|
-
description?: string | undefined;
|
|
217
|
-
name?: string | undefined;
|
|
218
|
-
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
219
|
-
image?: string | undefined;
|
|
220
|
-
website?: string | undefined;
|
|
221
|
-
}> | undefined;
|
|
222
|
-
image?: string | undefined;
|
|
223
|
-
fullName?: string | undefined;
|
|
224
|
-
preferredName?: string | undefined;
|
|
225
|
-
nickname?: string | undefined;
|
|
226
|
-
jobTitle?: string | undefined;
|
|
227
|
-
department?: string | undefined;
|
|
228
|
-
notes?: string | undefined;
|
|
229
|
-
emails?: {
|
|
230
|
-
readonly value: string;
|
|
231
|
-
readonly label?: string | undefined;
|
|
232
|
-
}[] | undefined;
|
|
233
|
-
identities?: {
|
|
234
|
-
readonly value: string;
|
|
235
|
-
readonly label?: string | undefined;
|
|
236
|
-
}[] | undefined;
|
|
237
|
-
phoneNumbers?: {
|
|
238
|
-
readonly value: string;
|
|
239
|
-
readonly label?: string | undefined;
|
|
240
|
-
}[] | undefined;
|
|
241
|
-
addresses?: {
|
|
242
|
-
readonly value: {
|
|
243
|
-
readonly street?: string | undefined;
|
|
244
|
-
readonly extended?: string | undefined;
|
|
245
|
-
readonly locality?: string | undefined;
|
|
246
|
-
readonly region?: string | undefined;
|
|
247
|
-
readonly postalCode?: string | undefined;
|
|
248
|
-
readonly postOfficeBoxNumber?: string | undefined;
|
|
249
|
-
readonly country?: string | undefined;
|
|
250
|
-
};
|
|
251
|
-
readonly label?: string | undefined;
|
|
252
|
-
}[] | undefined;
|
|
253
|
-
urls?: {
|
|
254
|
-
readonly value: string;
|
|
255
|
-
readonly label?: string | undefined;
|
|
256
|
-
}[] | undefined;
|
|
257
|
-
birthday?: {
|
|
258
|
-
toString: () => string;
|
|
259
|
-
toDateString: () => string;
|
|
260
|
-
toTimeString: () => string;
|
|
261
|
-
toLocaleString: {
|
|
262
|
-
(): string;
|
|
263
|
-
(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
|
|
264
|
-
(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
265
|
-
};
|
|
266
|
-
toLocaleDateString: {
|
|
267
|
-
(): string;
|
|
268
|
-
(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
|
|
269
|
-
(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
270
|
-
};
|
|
271
|
-
toLocaleTimeString: {
|
|
272
|
-
(): string;
|
|
273
|
-
(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
|
|
274
|
-
(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
275
|
-
};
|
|
276
|
-
valueOf: () => number;
|
|
277
|
-
getTime: () => number;
|
|
278
|
-
getFullYear: () => number;
|
|
279
|
-
getUTCFullYear: () => number;
|
|
280
|
-
getMonth: () => number;
|
|
281
|
-
getUTCMonth: () => number;
|
|
282
|
-
getDate: () => number;
|
|
283
|
-
getUTCDate: () => number;
|
|
284
|
-
getDay: () => number;
|
|
285
|
-
getUTCDay: () => number;
|
|
286
|
-
getHours: () => number;
|
|
287
|
-
getUTCHours: () => number;
|
|
288
|
-
getMinutes: () => number;
|
|
289
|
-
getUTCMinutes: () => number;
|
|
290
|
-
getSeconds: () => number;
|
|
291
|
-
getUTCSeconds: () => number;
|
|
292
|
-
getMilliseconds: () => number;
|
|
293
|
-
getUTCMilliseconds: () => number;
|
|
294
|
-
getTimezoneOffset: () => number;
|
|
295
|
-
setTime: (time: number) => number;
|
|
296
|
-
setMilliseconds: (ms: number) => number;
|
|
297
|
-
setUTCMilliseconds: (ms: number) => number;
|
|
298
|
-
setSeconds: (sec: number, ms?: number) => number;
|
|
299
|
-
setUTCSeconds: (sec: number, ms?: number) => number;
|
|
300
|
-
setMinutes: (min: number, sec?: number, ms?: number) => number;
|
|
301
|
-
setUTCMinutes: (min: number, sec?: number, ms?: number) => number;
|
|
302
|
-
setHours: (hours: number, min?: number, sec?: number, ms?: number) => number;
|
|
303
|
-
setUTCHours: (hours: number, min?: number, sec?: number, ms?: number) => number;
|
|
304
|
-
setDate: (date: number) => number;
|
|
305
|
-
setUTCDate: (date: number) => number;
|
|
306
|
-
setMonth: (month: number, date?: number) => number;
|
|
307
|
-
setUTCMonth: (month: number, date?: number) => number;
|
|
308
|
-
setFullYear: (year: number, month?: number, date?: number) => number;
|
|
309
|
-
setUTCFullYear: (year: number, month?: number, date?: number) => number;
|
|
310
|
-
toUTCString: () => string;
|
|
311
|
-
toISOString: () => string;
|
|
312
|
-
toJSON: (key?: any) => string;
|
|
313
|
-
[Symbol.toPrimitive]: {
|
|
314
|
-
(hint: "default"): string;
|
|
315
|
-
(hint: "string"): string;
|
|
316
|
-
(hint: "number"): number;
|
|
317
|
-
(hint: string): string | number;
|
|
318
|
-
};
|
|
319
|
-
} | undefined;
|
|
320
|
-
}>>;
|
|
321
|
-
identityDid: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
322
|
-
identityKey: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
323
|
-
email: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
324
|
-
name: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
325
|
-
role: import("effect/Schema").optional<import("effect/Schema").Literal<["user", "assistant"]>>;
|
|
326
|
-
}>>;
|
|
327
|
-
blocks: import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Union<[import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
|
|
328
|
-
pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
|
|
329
|
-
}>, import("effect/Schema").Struct<{
|
|
330
|
-
type: import("effect/Schema").Literal<["text"]>;
|
|
331
|
-
disposition: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
332
|
-
text: typeof import("effect/Schema").String;
|
|
333
|
-
}>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
|
|
334
|
-
pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
|
|
335
|
-
}>, import("effect/Schema").Struct<{
|
|
336
|
-
type: import("effect/Schema").Literal<["json"]>;
|
|
337
|
-
disposition: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
338
|
-
data: typeof import("effect/Schema").String;
|
|
339
|
-
}>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
|
|
340
|
-
pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
|
|
341
|
-
}>, import("effect/Schema").Struct<{
|
|
342
|
-
type: import("effect/Schema").Literal<["image"]>;
|
|
343
|
-
id: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
344
|
-
source: import("effect/Schema").optional<import("effect/Schema").Union<[import("effect/Schema").mutable<import("effect/Schema").Struct<{
|
|
345
|
-
type: import("effect/Schema").Literal<["base64"]>;
|
|
346
|
-
mediaType: typeof import("effect/Schema").String;
|
|
347
|
-
data: typeof import("effect/Schema").String;
|
|
348
|
-
}>>, import("effect/Schema").mutable<import("effect/Schema").Struct<{
|
|
349
|
-
type: import("effect/Schema").Literal<["http"]>;
|
|
350
|
-
url: typeof import("effect/Schema").String;
|
|
351
|
-
}>>]>>;
|
|
352
|
-
}>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
|
|
353
|
-
pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
|
|
354
|
-
}>, import("effect/Schema").Struct<{
|
|
355
|
-
type: import("effect/Schema").Literal<["reference"]>;
|
|
356
|
-
reference: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>;
|
|
357
|
-
}>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
|
|
358
|
-
pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
|
|
359
|
-
}>, import("effect/Schema").Struct<{
|
|
360
|
-
type: import("effect/Schema").Literal<["transcription"]>;
|
|
361
|
-
started: typeof import("effect/Schema").String;
|
|
362
|
-
text: typeof import("effect/Schema").String;
|
|
363
|
-
}>>>]>>>;
|
|
364
|
-
properties: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Record$<typeof import("effect/Schema").String, typeof import("effect/Schema").Any>>>;
|
|
365
|
-
}>, {}>>;
|
|
366
|
-
messageIndex: Schema.optional<typeof Schema.Number>;
|
|
202
|
+
subject: S.Schema<any, any, never>;
|
|
203
|
+
messageId: typeof S.String;
|
|
204
|
+
message: S.optional<typeof MessageType>;
|
|
205
|
+
messageIndex: S.optional<typeof S.Number>;
|
|
367
206
|
}>;
|
|
368
|
-
output: typeof
|
|
207
|
+
output: typeof S.Void;
|
|
369
208
|
}>;
|
|
370
209
|
export class DeleteMessage extends DeleteMessage_base {
|
|
371
210
|
}
|
|
372
211
|
export {};
|
|
373
212
|
}
|
|
374
|
-
export declare const ThreadSettingsSchema:
|
|
375
|
-
export type ThreadSettingsProps =
|
|
213
|
+
export declare const ThreadSettingsSchema: S.mutable<S.Struct<{}>>;
|
|
214
|
+
export type ThreadSettingsProps = S.Schema.Type<typeof ThreadSettingsSchema>;
|
|
376
215
|
export interface ThreadModel {
|
|
377
216
|
root: ThreadType;
|
|
378
217
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-thread",
|
|
3
|
-
"version": "0.8.2-main.
|
|
3
|
+
"version": "0.8.2-main.5885341",
|
|
4
4
|
"description": "DXOS Threads Surface plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -38,34 +38,33 @@
|
|
|
38
38
|
"@codemirror/view": "^6.34.1",
|
|
39
39
|
"@preact/signals-core": "^1.6.0",
|
|
40
40
|
"date-fns": "^3.3.1",
|
|
41
|
-
"effect": "3.14.21",
|
|
42
41
|
"lodash.get": "^4.4.2",
|
|
43
|
-
"@dxos/app-framework": "0.8.2-main.
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/local-storage": "0.8.2-main.
|
|
51
|
-
"@dxos/log": "0.8.2-main.
|
|
52
|
-
"@dxos/plugin-
|
|
53
|
-
"@dxos/plugin-
|
|
54
|
-
"@dxos/plugin-
|
|
55
|
-
"@dxos/plugin-
|
|
56
|
-
"@dxos/plugin-markdown": "0.8.2-main.
|
|
57
|
-
"@dxos/plugin-
|
|
58
|
-
"@dxos/plugin-
|
|
59
|
-
"@dxos/react-client": "0.8.2-main.
|
|
60
|
-
"@dxos/react-ui-
|
|
61
|
-
"@dxos/react-ui-editor": "0.8.2-main.
|
|
62
|
-
"@dxos/react-ui-menu": "0.8.2-main.
|
|
63
|
-
"@dxos/react-ui-
|
|
64
|
-
"@dxos/react-ui-
|
|
65
|
-
"@dxos/react-ui-
|
|
66
|
-
"@dxos/react-ui-
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
42
|
+
"@dxos/app-framework": "0.8.2-main.5885341",
|
|
43
|
+
"@dxos/echo-schema": "0.8.2-main.5885341",
|
|
44
|
+
"@dxos/invariant": "0.8.2-main.5885341",
|
|
45
|
+
"@dxos/async": "0.8.2-main.5885341",
|
|
46
|
+
"@dxos/display-name": "0.8.2-main.5885341",
|
|
47
|
+
"@dxos/keys": "0.8.2-main.5885341",
|
|
48
|
+
"@dxos/live-object": "0.8.2-main.5885341",
|
|
49
|
+
"@dxos/local-storage": "0.8.2-main.5885341",
|
|
50
|
+
"@dxos/log": "0.8.2-main.5885341",
|
|
51
|
+
"@dxos/plugin-client": "0.8.2-main.5885341",
|
|
52
|
+
"@dxos/plugin-graph": "0.8.2-main.5885341",
|
|
53
|
+
"@dxos/plugin-attention": "0.8.2-main.5885341",
|
|
54
|
+
"@dxos/plugin-deck": "0.8.2-main.5885341",
|
|
55
|
+
"@dxos/plugin-markdown": "0.8.2-main.5885341",
|
|
56
|
+
"@dxos/plugin-space": "0.8.2-main.5885341",
|
|
57
|
+
"@dxos/plugin-observability": "0.8.2-main.5885341",
|
|
58
|
+
"@dxos/react-client": "0.8.2-main.5885341",
|
|
59
|
+
"@dxos/react-ui-attention": "0.8.2-main.5885341",
|
|
60
|
+
"@dxos/react-ui-editor": "0.8.2-main.5885341",
|
|
61
|
+
"@dxos/react-ui-menu": "0.8.2-main.5885341",
|
|
62
|
+
"@dxos/react-ui-form": "0.8.2-main.5885341",
|
|
63
|
+
"@dxos/react-ui-stack": "0.8.2-main.5885341",
|
|
64
|
+
"@dxos/react-ui-thread": "0.8.2-main.5885341",
|
|
65
|
+
"@dxos/react-ui-tabs": "0.8.2-main.5885341",
|
|
66
|
+
"@dxos/schema": "0.8.2-main.5885341",
|
|
67
|
+
"@dxos/util": "0.8.2-main.5885341"
|
|
69
68
|
},
|
|
70
69
|
"devDependencies": {
|
|
71
70
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -75,18 +74,17 @@
|
|
|
75
74
|
"react": "~18.2.0",
|
|
76
75
|
"react-dom": "~18.2.0",
|
|
77
76
|
"vite": "5.4.7",
|
|
78
|
-
"@dxos/random": "0.8.2-main.
|
|
79
|
-
"@dxos/react-ui": "0.8.2-main.
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
77
|
+
"@dxos/random": "0.8.2-main.5885341",
|
|
78
|
+
"@dxos/react-ui": "0.8.2-main.5885341",
|
|
79
|
+
"@dxos/react-ui-theme": "0.8.2-main.5885341",
|
|
80
|
+
"@dxos/storybook-utils": "0.8.2-main.5885341"
|
|
82
81
|
},
|
|
83
82
|
"peerDependencies": {
|
|
84
83
|
"@phosphor-icons/react": "^2.1.5",
|
|
85
|
-
"effect": "^3.13.3",
|
|
86
84
|
"react": "~18.2.0",
|
|
87
85
|
"react-dom": "~18.2.0",
|
|
88
|
-
"@dxos/react-ui": "0.8.2-main.
|
|
89
|
-
"@dxos/react-ui-theme": "0.8.2-main.
|
|
86
|
+
"@dxos/react-ui": "0.8.2-main.5885341",
|
|
87
|
+
"@dxos/react-ui-theme": "0.8.2-main.5885341"
|
|
90
88
|
},
|
|
91
89
|
"publishConfig": {
|
|
92
90
|
"access": "public"
|
package/src/ThreadPlugin.tsx
CHANGED
|
@@ -7,9 +7,9 @@ import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
|
7
7
|
import { MarkdownEvents } from '@dxos/plugin-markdown';
|
|
8
8
|
import { SpaceCapabilities, ThreadEvents } from '@dxos/plugin-space';
|
|
9
9
|
import { ChannelType, defineObjectForm, ThreadType } from '@dxos/plugin-space/types';
|
|
10
|
-
import { type
|
|
10
|
+
import { type ReactiveEchoObject, RefArray } from '@dxos/react-client/echo';
|
|
11
11
|
import { translations as threadTranslations } from '@dxos/react-ui-thread';
|
|
12
|
-
import {
|
|
12
|
+
import { MessageType, MessageTypeV1, MessageTypeV1ToV2 } from '@dxos/schema';
|
|
13
13
|
|
|
14
14
|
import { AppGraphBuilder, IntentResolver, Markdown, ReactSurface, ThreadState } from './capabilities';
|
|
15
15
|
import { ThreadEvents as LocalThreadEvents } from './events';
|
|
@@ -58,16 +58,16 @@ export const ThreadPlugin = () =>
|
|
|
58
58
|
},
|
|
59
59
|
}),
|
|
60
60
|
contributes(Capabilities.Metadata, {
|
|
61
|
-
id:
|
|
61
|
+
id: MessageType.typename,
|
|
62
62
|
metadata: {
|
|
63
63
|
// TODO(wittjosiah): Move out of metadata.
|
|
64
|
-
loadReferences: (message:
|
|
64
|
+
loadReferences: (message: MessageType) => [], // loadObjectReferences(message, (message) => [...message.parts, message.context]),
|
|
65
65
|
},
|
|
66
66
|
}),
|
|
67
67
|
contributes(Capabilities.Metadata, {
|
|
68
68
|
id: THREAD_ITEM,
|
|
69
69
|
metadata: {
|
|
70
|
-
parse: (item:
|
|
70
|
+
parse: (item: ReactiveEchoObject<any>, type: string) => {
|
|
71
71
|
switch (type) {
|
|
72
72
|
case 'node':
|
|
73
73
|
return { id: item.id, label: item.title, data: item };
|
|
@@ -96,12 +96,12 @@ export const ThreadPlugin = () =>
|
|
|
96
96
|
defineModule({
|
|
97
97
|
id: `${meta.id}/module/schema`,
|
|
98
98
|
activatesOn: ClientEvents.SetupSchema,
|
|
99
|
-
activate: () => contributes(ClientCapabilities.Schema, [ThreadType,
|
|
99
|
+
activate: () => contributes(ClientCapabilities.Schema, [ThreadType, MessageType, MessageTypeV1]),
|
|
100
100
|
}),
|
|
101
101
|
defineModule({
|
|
102
102
|
id: `${meta.id}/module/migration`,
|
|
103
103
|
activatesOn: ClientEvents.SetupMigration,
|
|
104
|
-
activate: () => contributes(ClientCapabilities.Migration, [
|
|
104
|
+
activate: () => contributes(ClientCapabilities.Migration, [MessageTypeV1ToV2]),
|
|
105
105
|
}),
|
|
106
106
|
defineModule({
|
|
107
107
|
id: `${meta.id}/module/markdown`,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';
|
|
6
|
-
import { type
|
|
6
|
+
import { type ReactiveEchoObject } from '@dxos/client/echo';
|
|
7
7
|
import { PLANK_COMPANION_TYPE, ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';
|
|
8
8
|
import { createExtension, type Node } from '@dxos/plugin-graph';
|
|
9
9
|
|
|
@@ -14,8 +14,8 @@ export default (context: PluginsContext) =>
|
|
|
14
14
|
createExtension({
|
|
15
15
|
id: `${meta.id}/comments`,
|
|
16
16
|
// TODO(wittjosiah): Support comments on any object.
|
|
17
|
-
// filter: (node): node is Node<
|
|
18
|
-
filter: (node): node is Node<
|
|
17
|
+
// filter: (node): node is Node<ReactiveEchoObject<any>> => isEchoObject(node.data),
|
|
18
|
+
filter: (node): node is Node<ReactiveEchoObject<any>> =>
|
|
19
19
|
!!node.data && typeof node.data === 'object' && 'threads' in node.data && Array.isArray(node.data.threads),
|
|
20
20
|
connector: ({ node }) => [
|
|
21
21
|
{
|
|
@@ -12,7 +12,7 @@ import { ATTENDABLE_PATH_SEPARATOR, DeckAction } from '@dxos/plugin-deck/types';
|
|
|
12
12
|
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
13
13
|
import { ChannelType, ThreadType } from '@dxos/plugin-space/types';
|
|
14
14
|
import { live, fullyQualifiedId, getSpace, makeRef } from '@dxos/react-client/echo';
|
|
15
|
-
import {
|
|
15
|
+
import { MessageType } from '@dxos/schema';
|
|
16
16
|
|
|
17
17
|
import { ThreadCapabilities } from './capabilities';
|
|
18
18
|
import { THREAD_PLUGIN } from '../meta';
|
|
@@ -172,7 +172,7 @@ export default (context: PluginsContext) =>
|
|
|
172
172
|
invariant(space, 'Space not found');
|
|
173
173
|
const intents = [];
|
|
174
174
|
|
|
175
|
-
const message = live(
|
|
175
|
+
const message = live(MessageType, {
|
|
176
176
|
sender,
|
|
177
177
|
created: new Date().toISOString(),
|
|
178
178
|
blocks: [{ type: 'text', text }],
|
|
@@ -19,7 +19,7 @@ import { live, type Space } from '@dxos/react-client/echo';
|
|
|
19
19
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
20
20
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
21
21
|
import { Thread } from '@dxos/react-ui-thread';
|
|
22
|
-
import {
|
|
22
|
+
import { MessageType } from '@dxos/schema';
|
|
23
23
|
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
24
24
|
|
|
25
25
|
import { ChatContainer } from './ChatContainer';
|
|
@@ -81,7 +81,7 @@ const meta: Meta = {
|
|
|
81
81
|
}),
|
|
82
82
|
withTheme,
|
|
83
83
|
withLayout({ fullscreen: true, tooltips: true }),
|
|
84
|
-
withClientProvider({ createSpace: true, types: [ThreadType,
|
|
84
|
+
withClientProvider({ createSpace: true, types: [ThreadType, MessageType] }),
|
|
85
85
|
],
|
|
86
86
|
parameters: { translations },
|
|
87
87
|
};
|
|
@@ -14,7 +14,7 @@ import { createBasicExtensions, createThemeExtensions, listener } from '@dxos/re
|
|
|
14
14
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
15
15
|
import { mx } from '@dxos/react-ui-theme';
|
|
16
16
|
import { MessageTextbox, type MessageTextboxProps, Thread, ThreadFooter, threadLayout } from '@dxos/react-ui-thread';
|
|
17
|
-
import {
|
|
17
|
+
import { MessageType } from '@dxos/schema';
|
|
18
18
|
|
|
19
19
|
import { MessageContainer } from './MessageContainer';
|
|
20
20
|
import { command } from './command-extension';
|
|
@@ -44,7 +44,7 @@ export const ChatContainer = ({ space, dxn, context, current, autoFocusTextbox }
|
|
|
44
44
|
const id = dxn.toString();
|
|
45
45
|
const identity = useIdentity()!;
|
|
46
46
|
const members = useMembers(space?.key);
|
|
47
|
-
const queue = useQueue<
|
|
47
|
+
const queue = useQueue<MessageType>(dxn, { pollInterval: 1_000 });
|
|
48
48
|
const activity = useStatus(space, id);
|
|
49
49
|
const { t } = useTranslation(THREAD_PLUGIN);
|
|
50
50
|
// TODO(wittjosiah): This is a hack to reset the editor after a message is sent.
|
|
@@ -84,7 +84,7 @@ export const ChatContainer = ({ space, dxn, context, current, autoFocusTextbox }
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
queue.append([
|
|
87
|
-
create(
|
|
87
|
+
create(MessageType, {
|
|
88
88
|
sender: { identityDid: identity.did },
|
|
89
89
|
created: new Date().toISOString(),
|
|
90
90
|
blocks: [{ type: 'text', text: messageRef.current }],
|
|
@@ -14,7 +14,7 @@ import { faker } from '@dxos/random';
|
|
|
14
14
|
import { Filter, fullyQualifiedId, useQuery, useSpace } from '@dxos/react-client/echo';
|
|
15
15
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
16
16
|
import { type ClientRepeatedComponentProps, ClientRepeater } from '@dxos/react-client/testing';
|
|
17
|
-
import {
|
|
17
|
+
import { MessageType } from '@dxos/schema';
|
|
18
18
|
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
19
19
|
|
|
20
20
|
import { CommentsContainer } from './CommentsContainer';
|
|
@@ -59,7 +59,7 @@ export const Default = {};
|
|
|
59
59
|
const meta: Meta = {
|
|
60
60
|
title: 'plugins/plugin-thread/Comments',
|
|
61
61
|
// TODO(wittjosiah): Use decorator.
|
|
62
|
-
render: () => <ClientRepeater component={Story} createIdentity createSpace types={[ThreadType,
|
|
62
|
+
render: () => <ClientRepeater component={Story} createIdentity createSpace types={[ThreadType, MessageType]} />,
|
|
63
63
|
decorators: [
|
|
64
64
|
withTheme,
|
|
65
65
|
withLayout({ fullscreen: true, tooltips: true }),
|