@dxos/plugin-thread 0.8.2-main.f11618f → 0.8.2-main.fbd8ed0
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-WC6KQDDU.mjs → ChatContainer-H4XTHM3A.mjs} +5 -5
- package/dist/lib/browser/ChatContainer-H4XTHM3A.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-6W4UKJDI.mjs → app-graph-builder-V7UUHGUI.mjs} +10 -7
- package/dist/lib/browser/app-graph-builder-V7UUHGUI.mjs.map +7 -0
- package/dist/lib/browser/{chunk-AYNXYEKP.mjs → chunk-32EIWOAL.mjs} +1 -1
- package/dist/lib/browser/{chunk-AYNXYEKP.mjs.map → chunk-32EIWOAL.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-FY5OCUP6.mjs → chunk-I3JK6CBS.mjs} +9 -7
- package/dist/lib/browser/chunk-I3JK6CBS.mjs.map +7 -0
- package/dist/lib/browser/chunk-OO7PQPV5.mjs +93 -0
- package/dist/lib/browser/chunk-OO7PQPV5.mjs.map +7 -0
- package/dist/lib/browser/chunk-YRGWE35W.mjs +17 -0
- package/dist/lib/browser/index.mjs +10 -10
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-3UW6ROYT.mjs → intent-resolver-PDOLX5B7.mjs} +14 -19
- package/dist/lib/browser/intent-resolver-PDOLX5B7.mjs.map +7 -0
- package/dist/lib/browser/{markdown-7KXBXCUS.mjs → markdown-XJJVUBDO.mjs} +4 -4
- package/dist/lib/browser/markdown-XJJVUBDO.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-F2AIYIUH.mjs → react-surface-7DJZKIOK.mjs} +19 -20
- package/dist/lib/browser/react-surface-7DJZKIOK.mjs.map +7 -0
- package/dist/lib/browser/{settings-2VZ7S4SK.mjs → settings-K56QXNJ4.mjs} +2 -2
- package/dist/lib/browser/types.mjs +1 -1
- package/dist/lib/node/{ChatContainer-LVYQ67PJ.cjs → ChatContainer-TUISUIY7.cjs} +11 -11
- package/dist/lib/node/ChatContainer-TUISUIY7.cjs.map +7 -0
- package/dist/lib/node/{app-graph-builder-HZNWT4QU.cjs → app-graph-builder-MMM26FEH.cjs} +13 -10
- package/dist/lib/node/app-graph-builder-MMM26FEH.cjs.map +7 -0
- package/dist/lib/node/{chunk-IX63EKGL.cjs → chunk-AZ275P4V.cjs} +9 -9
- package/dist/lib/node/{chunk-RIYLEDQ7.cjs → chunk-ETDNE4Z6.cjs} +13 -11
- package/dist/lib/node/chunk-ETDNE4Z6.cjs.map +7 -0
- package/dist/lib/node/{chunk-46BSFPBV.cjs → chunk-GRMB5VRN.cjs} +49 -49
- package/dist/lib/node/chunk-GRMB5VRN.cjs.map +7 -0
- package/dist/lib/node/{chunk-W25MBII2.cjs → chunk-NO6WQR36.cjs} +4 -4
- package/dist/lib/node/{chunk-W25MBII2.cjs.map → chunk-NO6WQR36.cjs.map} +2 -2
- package/dist/lib/node/index.cjs +17 -17
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-DC6HDNTX.cjs → intent-resolver-MNTL32W2.cjs} +24 -29
- package/dist/lib/node/intent-resolver-MNTL32W2.cjs.map +7 -0
- package/dist/lib/node/{markdown-L2WMCQKM.cjs → markdown-25NI6Q4Y.cjs} +9 -9
- package/dist/lib/node/markdown-25NI6Q4Y.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-GP5IH5LN.cjs → react-surface-KGUZJVRL.cjs} +30 -31
- package/dist/lib/node/react-surface-KGUZJVRL.cjs.map +7 -0
- package/dist/lib/node/{settings-7MGTJ46L.cjs → settings-4WLSO726.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-WMOPMK5H.mjs → ChatContainer-G7VTTRDN.mjs} +5 -5
- package/dist/lib/node-esm/ChatContainer-G7VTTRDN.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-M3KK5QJH.mjs → app-graph-builder-QEFJ2KA4.mjs} +10 -7
- package/dist/lib/node-esm/app-graph-builder-QEFJ2KA4.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-5XUQJWUG.mjs +19 -0
- package/dist/lib/node-esm/chunk-A7RLBTTZ.mjs +94 -0
- package/dist/lib/node-esm/chunk-A7RLBTTZ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-T6E5EY7Z.mjs → chunk-IZWN4KAY.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-T6E5EY7Z.mjs.map → chunk-IZWN4KAY.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-7DOPZH6Y.mjs → chunk-V7HLWNAO.mjs} +9 -7
- package/dist/lib/node-esm/chunk-V7HLWNAO.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +10 -10
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-OAMDKGAA.mjs → intent-resolver-X2FNKFSK.mjs} +14 -19
- package/dist/lib/node-esm/intent-resolver-X2FNKFSK.mjs.map +7 -0
- package/dist/lib/node-esm/{markdown-ZKU23UVD.mjs → markdown-2ERASVEO.mjs} +4 -4
- package/dist/lib/node-esm/markdown-2ERASVEO.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-45GRKLWG.mjs → react-surface-DLD2UJRM.mjs} +19 -20
- package/dist/lib/node-esm/react-surface-DLD2UJRM.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-AJAZ3O47.mjs → settings-5UA6FBMW.mjs} +2 -2
- package/dist/lib/node-esm/types.mjs +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +3 -179
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts +2 -2
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
- package/dist/types/src/components/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/CommentContainer.d.ts.map +1 -1
- package/dist/types/src/components/Comments.stories.d.ts +1 -1
- package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
- package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
- package/dist/types/src/components/MessageContainer.d.ts +5 -4
- package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
- package/dist/types/src/components/ThreadComplementary.d.ts.map +1 -1
- package/dist/types/src/components/ThreadSettings.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +49 -114
- 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/extensions/threads.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/hooks/useStatus.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -56
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +166 -121
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +40 -33
- package/src/ThreadPlugin.tsx +7 -7
- package/src/capabilities/app-graph-builder.ts +31 -21
- package/src/capabilities/intent-resolver.ts +10 -11
- package/src/capabilities/markdown.ts +4 -4
- package/src/components/Chat.stories.tsx +5 -6
- package/src/components/ChatContainer.tsx +3 -3
- package/src/components/CommentContainer.tsx +25 -49
- package/src/components/Comments.stories.tsx +9 -7
- package/src/components/MessageContainer.tsx +31 -50
- package/src/components/testing.ts +2 -2
- package/src/components/types.ts +2 -2
- package/src/hooks/analytics.ts +6 -2
- package/src/translations.ts +2 -2
- package/src/types.ts +40 -40
- package/dist/lib/browser/ChatContainer-WC6KQDDU.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-6W4UKJDI.mjs.map +0 -7
- package/dist/lib/browser/chunk-FY5OCUP6.mjs.map +0 -7
- package/dist/lib/browser/chunk-Q66FBBJD.mjs +0 -17
- package/dist/lib/browser/chunk-WOG72DWE.mjs +0 -93
- package/dist/lib/browser/chunk-WOG72DWE.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-3UW6ROYT.mjs.map +0 -7
- package/dist/lib/browser/markdown-7KXBXCUS.mjs.map +0 -7
- package/dist/lib/browser/react-surface-F2AIYIUH.mjs.map +0 -7
- package/dist/lib/node/ChatContainer-LVYQ67PJ.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-HZNWT4QU.cjs.map +0 -7
- package/dist/lib/node/chunk-46BSFPBV.cjs.map +0 -7
- package/dist/lib/node/chunk-RIYLEDQ7.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-DC6HDNTX.cjs.map +0 -7
- package/dist/lib/node/markdown-L2WMCQKM.cjs.map +0 -7
- package/dist/lib/node/react-surface-GP5IH5LN.cjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-WMOPMK5H.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-M3KK5QJH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7DOPZH6Y.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-E446MGLP.mjs +0 -94
- package/dist/lib/node-esm/chunk-E446MGLP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QUTIMZJ4.mjs +0 -19
- package/dist/lib/node-esm/intent-resolver-OAMDKGAA.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-ZKU23UVD.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-45GRKLWG.mjs.map +0 -7
- /package/dist/lib/browser/{chunk-Q66FBBJD.mjs.map → chunk-YRGWE35W.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-2VZ7S4SK.mjs.map → settings-K56QXNJ4.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-IX63EKGL.cjs.map → chunk-AZ275P4V.cjs.map} +0 -0
- /package/dist/lib/node/{settings-7MGTJ46L.cjs.map → settings-4WLSO726.cjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-QUTIMZJ4.mjs.map → chunk-5XUQJWUG.mjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-AJAZ3O47.mjs.map → settings-5UA6FBMW.mjs.map} +0 -0
|
@@ -1,74 +1,79 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
2
|
import { ChannelType, ThreadType } from '@dxos/plugin-space/types';
|
|
3
|
-
import { MessageType } from '@dxos/schema';
|
|
4
3
|
export declare namespace ThreadAction {
|
|
5
|
-
const CreateChannel_base:
|
|
6
|
-
readonly _tag:
|
|
4
|
+
const CreateChannel_base: Schema.TaggedClass<CreateChannel, "dxos.org/plugin/thread/action/create-channel", {
|
|
5
|
+
readonly _tag: Schema.tag<"dxos.org/plugin/thread/action/create-channel">;
|
|
7
6
|
} & {
|
|
8
|
-
input:
|
|
9
|
-
spaceId:
|
|
10
|
-
|
|
7
|
+
input: Schema.Struct<{
|
|
8
|
+
spaceId: Schema.Schema<import("@dxos/keys").SpaceId, string, never> & {
|
|
9
|
+
byteLength: number;
|
|
10
|
+
encode: (value: Uint8Array) => import("@dxos/keys").SpaceId;
|
|
11
|
+
decode: (value: import("@dxos/keys").SpaceId) => Uint8Array;
|
|
12
|
+
isValid: (value: string) => value is import("@dxos/keys").SpaceId;
|
|
13
|
+
random: () => import("@dxos/keys").SpaceId;
|
|
14
|
+
};
|
|
15
|
+
name: Schema.optional<typeof Schema.String>;
|
|
11
16
|
}>;
|
|
12
|
-
output:
|
|
17
|
+
output: Schema.Struct<{
|
|
13
18
|
object: typeof ChannelType;
|
|
14
19
|
}>;
|
|
15
20
|
}>;
|
|
16
21
|
export class CreateChannel extends CreateChannel_base {
|
|
17
22
|
}
|
|
18
|
-
const Create_base:
|
|
19
|
-
readonly _tag:
|
|
23
|
+
const Create_base: Schema.TaggedClass<Create, "dxos.org/plugin/thread/action/create", {
|
|
24
|
+
readonly _tag: Schema.tag<"dxos.org/plugin/thread/action/create">;
|
|
20
25
|
} & {
|
|
21
|
-
input:
|
|
22
|
-
name:
|
|
23
|
-
cursor: typeof
|
|
24
|
-
subject:
|
|
26
|
+
input: Schema.Struct<{
|
|
27
|
+
name: Schema.optional<typeof Schema.String>;
|
|
28
|
+
cursor: typeof Schema.String;
|
|
29
|
+
subject: Schema.Schema<any, any, never>;
|
|
25
30
|
}>;
|
|
26
|
-
output:
|
|
31
|
+
output: Schema.Struct<{
|
|
27
32
|
object: typeof ThreadType;
|
|
28
33
|
}>;
|
|
29
34
|
}>;
|
|
30
35
|
export class Create extends Create_base {
|
|
31
36
|
}
|
|
32
|
-
const
|
|
33
|
-
readonly _tag:
|
|
37
|
+
const Delete_base: Schema.TaggedClass<Delete, "dxos.org/plugin/thread/action/delete", {
|
|
38
|
+
readonly _tag: Schema.tag<"dxos.org/plugin/thread/action/delete">;
|
|
34
39
|
} & {
|
|
35
|
-
input:
|
|
36
|
-
|
|
40
|
+
input: Schema.Struct<{
|
|
41
|
+
thread: typeof ThreadType;
|
|
42
|
+
subject: Schema.Schema<any, any, never>;
|
|
43
|
+
cursor: Schema.optional<typeof Schema.String>;
|
|
37
44
|
}>;
|
|
38
|
-
output: typeof
|
|
45
|
+
output: typeof Schema.Void;
|
|
39
46
|
}>;
|
|
40
|
-
export class
|
|
47
|
+
export class Delete extends Delete_base {
|
|
41
48
|
}
|
|
42
|
-
const
|
|
43
|
-
readonly _tag:
|
|
49
|
+
const Select_base: Schema.TaggedClass<Select, "dxos.org/plugin/thread/action/select", {
|
|
50
|
+
readonly _tag: Schema.tag<"dxos.org/plugin/thread/action/select">;
|
|
44
51
|
} & {
|
|
45
|
-
input:
|
|
46
|
-
|
|
52
|
+
input: Schema.Struct<{
|
|
53
|
+
current: typeof Schema.String;
|
|
47
54
|
}>;
|
|
48
|
-
output: typeof
|
|
55
|
+
output: typeof Schema.Void;
|
|
49
56
|
}>;
|
|
50
|
-
export class
|
|
57
|
+
export class Select extends Select_base {
|
|
51
58
|
}
|
|
52
|
-
const
|
|
53
|
-
readonly _tag:
|
|
59
|
+
const ToggleResolved_base: Schema.TaggedClass<ToggleResolved, "dxos.org/plugin/thread/action/toggle-resolved", {
|
|
60
|
+
readonly _tag: Schema.tag<"dxos.org/plugin/thread/action/toggle-resolved">;
|
|
54
61
|
} & {
|
|
55
|
-
input:
|
|
62
|
+
input: Schema.Struct<{
|
|
56
63
|
thread: typeof ThreadType;
|
|
57
|
-
subject: S.Schema<any, any, never>;
|
|
58
|
-
cursor: S.optional<typeof S.String>;
|
|
59
64
|
}>;
|
|
60
|
-
output: typeof
|
|
65
|
+
output: typeof Schema.Void;
|
|
61
66
|
}>;
|
|
62
|
-
export class
|
|
67
|
+
export class ToggleResolved extends ToggleResolved_base {
|
|
63
68
|
}
|
|
64
|
-
const AddMessage_base:
|
|
65
|
-
readonly _tag:
|
|
69
|
+
const AddMessage_base: Schema.TaggedClass<AddMessage, "dxos.org/plugin/thread/action/add-message", {
|
|
70
|
+
readonly _tag: Schema.tag<"dxos.org/plugin/thread/action/add-message">;
|
|
66
71
|
} & {
|
|
67
|
-
input:
|
|
68
|
-
subject:
|
|
72
|
+
input: Schema.Struct<{
|
|
73
|
+
subject: Schema.Schema<any, any, never>;
|
|
69
74
|
thread: typeof ThreadType;
|
|
70
|
-
sender:
|
|
71
|
-
contact:
|
|
75
|
+
sender: Schema.Struct<{
|
|
76
|
+
contact: import("effect/Schema").optional<import("@dxos/echo-schema").Ref$<{
|
|
72
77
|
readonly id: string;
|
|
73
78
|
fields?: {
|
|
74
79
|
readonly value: string;
|
|
@@ -102,7 +107,9 @@ export declare namespace ThreadAction {
|
|
|
102
107
|
readonly value: string;
|
|
103
108
|
readonly label?: string | undefined;
|
|
104
109
|
}[] | undefined;
|
|
105
|
-
addresses
|
|
110
|
+
addresses
|
|
111
|
+
/** Current channel activity. */
|
|
112
|
+
? /** Current channel activity. */: {
|
|
106
113
|
readonly value: {
|
|
107
114
|
readonly street?: string | undefined;
|
|
108
115
|
readonly extended?: string | undefined;
|
|
@@ -118,100 +125,138 @@ export declare namespace ThreadAction {
|
|
|
118
125
|
readonly value: string;
|
|
119
126
|
readonly label?: string | undefined;
|
|
120
127
|
}[] | undefined;
|
|
121
|
-
birthday?:
|
|
122
|
-
toString: () => string;
|
|
123
|
-
toDateString: () => string;
|
|
124
|
-
toTimeString: () => string;
|
|
125
|
-
toLocaleString: {
|
|
126
|
-
(): string;
|
|
127
|
-
(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
|
|
128
|
-
(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
129
|
-
};
|
|
130
|
-
toLocaleDateString: {
|
|
131
|
-
(): string;
|
|
132
|
-
(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
|
|
133
|
-
(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
134
|
-
};
|
|
135
|
-
toLocaleTimeString: {
|
|
136
|
-
(): string;
|
|
137
|
-
(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
|
|
138
|
-
(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
139
|
-
};
|
|
140
|
-
valueOf: () => number;
|
|
141
|
-
getTime: () => number;
|
|
142
|
-
getFullYear: () => number;
|
|
143
|
-
getUTCFullYear: () => number;
|
|
144
|
-
getMonth: () => number;
|
|
145
|
-
getUTCMonth: () => number;
|
|
146
|
-
getDate: () => number;
|
|
147
|
-
getUTCDate: () => number;
|
|
148
|
-
getDay: () => number;
|
|
149
|
-
getUTCDay: () => number;
|
|
150
|
-
getHours: () => number;
|
|
151
|
-
getUTCHours: () => number;
|
|
152
|
-
getMinutes: () => number;
|
|
153
|
-
getUTCMinutes: () => number;
|
|
154
|
-
getSeconds: () => number;
|
|
155
|
-
getUTCSeconds: () => number;
|
|
156
|
-
getMilliseconds: () => number;
|
|
157
|
-
getUTCMilliseconds: () => number;
|
|
158
|
-
getTimezoneOffset: () => number;
|
|
159
|
-
setTime: (time: number) => number;
|
|
160
|
-
setMilliseconds: (ms: number) => number;
|
|
161
|
-
setUTCMilliseconds: (ms: number) => number;
|
|
162
|
-
setSeconds: (sec: number, ms?: number) => number;
|
|
163
|
-
setUTCSeconds: (sec: number, ms?: number) => number;
|
|
164
|
-
setMinutes: (min: number, sec?: number, ms?: number) => number;
|
|
165
|
-
setUTCMinutes: (min: number, sec?: number, ms?: number) => number;
|
|
166
|
-
setHours: (hours: number, min?: number, sec?: number, ms?: number) => number;
|
|
167
|
-
setUTCHours: (hours: number, min?: number, sec?: number, ms?: number) => number;
|
|
168
|
-
setDate: (date: number) => number;
|
|
169
|
-
setUTCDate: (date: number) => number;
|
|
170
|
-
setMonth: (month: number, date?: number) => number;
|
|
171
|
-
setUTCMonth: (month: number, date?: number) => number;
|
|
172
|
-
setFullYear: (year: number, month?: number, date?: number) => number;
|
|
173
|
-
setUTCFullYear: (year: number, month?: number, date?: number) => number;
|
|
174
|
-
toUTCString: () => string;
|
|
175
|
-
toISOString: () => string;
|
|
176
|
-
toJSON: (key?: any) => string;
|
|
177
|
-
[Symbol.toPrimitive]: {
|
|
178
|
-
(hint: "default"): string;
|
|
179
|
-
(hint: "string"): string;
|
|
180
|
-
(hint: "number"): number;
|
|
181
|
-
(hint: string): string | number;
|
|
182
|
-
};
|
|
183
|
-
} | undefined;
|
|
128
|
+
birthday?: string | undefined;
|
|
184
129
|
}>>;
|
|
185
|
-
identityDid:
|
|
186
|
-
identityKey:
|
|
187
|
-
email:
|
|
188
|
-
name:
|
|
189
|
-
role:
|
|
130
|
+
identityDid: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
131
|
+
identityKey: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
132
|
+
email: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
133
|
+
name: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
134
|
+
role: import("effect/Schema").optional<import("effect/Schema").Literal<["user", "assistant"]>>;
|
|
190
135
|
}>;
|
|
191
|
-
text: typeof
|
|
136
|
+
text: typeof Schema.String;
|
|
192
137
|
}>;
|
|
193
|
-
output: typeof
|
|
138
|
+
output: typeof Schema.Void;
|
|
194
139
|
}>;
|
|
195
140
|
export class AddMessage extends AddMessage_base {
|
|
196
141
|
}
|
|
197
|
-
const DeleteMessage_base:
|
|
198
|
-
readonly _tag:
|
|
142
|
+
const DeleteMessage_base: Schema.TaggedClass<DeleteMessage, "dxos.org/plugin/thread/action/delete-message", {
|
|
143
|
+
readonly _tag: Schema.tag<"dxos.org/plugin/thread/action/delete-message">;
|
|
199
144
|
} & {
|
|
200
|
-
input:
|
|
145
|
+
input: Schema.Struct<{
|
|
201
146
|
thread: typeof ThreadType;
|
|
202
|
-
subject:
|
|
203
|
-
messageId: typeof
|
|
204
|
-
message:
|
|
205
|
-
|
|
147
|
+
subject: Schema.Schema<any, any, never>;
|
|
148
|
+
messageId: typeof Schema.String;
|
|
149
|
+
message: Schema.optional<import("@dxos/echo-schema").EchoTypeSchema<Schema.Struct<{
|
|
150
|
+
id: import("@dxos/echo-schema").ObjectIdClass;
|
|
151
|
+
created: import("effect/Schema").SchemaClass<string, string, never>;
|
|
152
|
+
sender: import("effect/Schema").mutable<import("effect/Schema").Struct<{
|
|
153
|
+
contact: import("effect/Schema").optional<import("@dxos/echo-schema").Ref$<{
|
|
154
|
+
readonly id: string;
|
|
155
|
+
fields?: {
|
|
156
|
+
readonly value: string;
|
|
157
|
+
readonly label: string;
|
|
158
|
+
readonly category?: string | undefined;
|
|
159
|
+
}[] | undefined;
|
|
160
|
+
organization?: import("@dxos/echo-schema").Ref<{
|
|
161
|
+
readonly id: string;
|
|
162
|
+
description?: string | undefined;
|
|
163
|
+
name?: string | undefined;
|
|
164
|
+
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
165
|
+
image?: string | undefined;
|
|
166
|
+
website?: string | undefined;
|
|
167
|
+
}> | undefined;
|
|
168
|
+
image?: string | undefined;
|
|
169
|
+
fullName?: string | undefined;
|
|
170
|
+
preferredName?: string | undefined;
|
|
171
|
+
nickname?: string | undefined;
|
|
172
|
+
jobTitle?: string | undefined;
|
|
173
|
+
department?: string | undefined;
|
|
174
|
+
notes?: string | undefined;
|
|
175
|
+
emails?: {
|
|
176
|
+
readonly value: string;
|
|
177
|
+
readonly label?: string | undefined;
|
|
178
|
+
}[] | undefined;
|
|
179
|
+
identities?: {
|
|
180
|
+
readonly value: string;
|
|
181
|
+
readonly label?: string | undefined;
|
|
182
|
+
}[] | undefined;
|
|
183
|
+
phoneNumbers?: {
|
|
184
|
+
readonly value: string;
|
|
185
|
+
readonly label?: string | undefined;
|
|
186
|
+
}[] | undefined;
|
|
187
|
+
addresses?: {
|
|
188
|
+
readonly value: {
|
|
189
|
+
readonly street?: string | undefined;
|
|
190
|
+
readonly extended?: string | undefined;
|
|
191
|
+
readonly locality?: string | undefined;
|
|
192
|
+
readonly region?: string | undefined;
|
|
193
|
+
readonly postalCode?: string | undefined;
|
|
194
|
+
readonly postOfficeBoxNumber?: string | undefined;
|
|
195
|
+
readonly country?: string | undefined;
|
|
196
|
+
};
|
|
197
|
+
readonly label?: string | undefined;
|
|
198
|
+
}[] | undefined;
|
|
199
|
+
urls?: {
|
|
200
|
+
readonly value: string;
|
|
201
|
+
readonly label?: string | undefined;
|
|
202
|
+
}[] | undefined;
|
|
203
|
+
birthday?: string | undefined;
|
|
204
|
+
}>>;
|
|
205
|
+
identityDid: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
206
|
+
identityKey: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
207
|
+
email: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
208
|
+
name: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
209
|
+
role: import("effect/Schema").optional<import("effect/Schema").Literal<["user", "assistant"]>>;
|
|
210
|
+
}>>;
|
|
211
|
+
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<{
|
|
212
|
+
pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
|
|
213
|
+
}>, import("effect/Schema").Struct<{
|
|
214
|
+
type: import("effect/Schema").Literal<["text"]>;
|
|
215
|
+
disposition: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
216
|
+
text: typeof import("effect/Schema").String;
|
|
217
|
+
}>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
|
|
218
|
+
pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
|
|
219
|
+
}>, import("effect/Schema").Struct<{
|
|
220
|
+
type: import("effect/Schema").Literal<["json"]>;
|
|
221
|
+
disposition: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
222
|
+
data: typeof import("effect/Schema").String;
|
|
223
|
+
}>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
|
|
224
|
+
pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
|
|
225
|
+
}>, import("effect/Schema").Struct<{
|
|
226
|
+
type: import("effect/Schema").Literal<["image"]>;
|
|
227
|
+
id: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
228
|
+
source: import("effect/Schema").optional<import("effect/Schema").Union<[import("effect/Schema").mutable<import("effect/Schema").Struct<{
|
|
229
|
+
type: import("effect/Schema").Literal<["base64"]>;
|
|
230
|
+
mediaType: typeof import("effect/Schema").String;
|
|
231
|
+
data: typeof import("effect/Schema").String;
|
|
232
|
+
}>>, import("effect/Schema").mutable<import("effect/Schema").Struct<{
|
|
233
|
+
type: import("effect/Schema").Literal<["http"]>;
|
|
234
|
+
url: typeof import("effect/Schema").String;
|
|
235
|
+
}>>]>>;
|
|
236
|
+
}>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
|
|
237
|
+
pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
|
|
238
|
+
}>, import("effect/Schema").Struct<{
|
|
239
|
+
type: import("effect/Schema").Literal<["reference"]>;
|
|
240
|
+
reference: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>;
|
|
241
|
+
}>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
|
|
242
|
+
pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
|
|
243
|
+
}>, import("effect/Schema").Struct<{
|
|
244
|
+
type: import("effect/Schema").Literal<["transcription"]>;
|
|
245
|
+
started: typeof import("effect/Schema").String;
|
|
246
|
+
text: typeof import("effect/Schema").String;
|
|
247
|
+
}>>>]>>>;
|
|
248
|
+
properties: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Record$<typeof import("effect/Schema").String, typeof import("effect/Schema").Any>>>;
|
|
249
|
+
}>, {}>>;
|
|
250
|
+
messageIndex: Schema.optional<typeof Schema.Number>;
|
|
206
251
|
}>;
|
|
207
|
-
output: typeof
|
|
252
|
+
output: typeof Schema.Void;
|
|
208
253
|
}>;
|
|
209
254
|
export class DeleteMessage extends DeleteMessage_base {
|
|
210
255
|
}
|
|
211
256
|
export {};
|
|
212
257
|
}
|
|
213
|
-
export declare const ThreadSettingsSchema:
|
|
214
|
-
export type ThreadSettingsProps =
|
|
258
|
+
export declare const ThreadSettingsSchema: Schema.mutable<Schema.Struct<{}>>;
|
|
259
|
+
export type ThreadSettingsProps = Schema.Schema.Type<typeof ThreadSettingsSchema>;
|
|
215
260
|
export interface ThreadModel {
|
|
216
261
|
root: ThreadType;
|
|
217
262
|
}
|
|
@@ -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":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAMnE,yBAAiB,YAAY,CAAC;;;;;;;;;;;;;;;;;;IAG5B,MAAM,OAAO,aAAc,SAAQ,kBAQjC;KAAG;;;;;;;;;;;;;IAEL,MAAM,OAAO,MAAO,SAAQ,WAS1B;KAAG;;;;;;;;;;;IAEL,MAAM,OAAO,MAAO,SAAQ,WAO1B;KAAG;;;;;;;;;IAEL,MAAM,OAAO,MAAO,SAAQ,WAK1B;KAAG;;;;;;;;;IAEL,MAAM,OAAO,cAAe,SAAQ,mBAKlC;KAAG;;;;;;;;;;0BAZ+E,CAAC;;;yCAOtE,CAAC;;gCAA2E,CAAC;;mCAI1E,CAAC;4BAGQ,CAAC;8BAA4C,CAAC;6BAGnE,CAAC;+BACmB,CAAC;;yBAIvB,CAAC;4BAEiC,CAAC;iCAA+C,CAAC;4BACpE,CAAC;4BAEX,CAAC;8BACW,CAAC;yBACO,CAAC;0BACV,CAAC;;sCAMtB,CAAC;;8BACE,CAAC;;sCAA0E,CAAC;;gCAM/D,CAAC;;sCAET,CAAC;;;oBAGR,gCAAgC;oBAChC,CADF,CAAE,gCAAgC;;2CACI,CAAC;6CAEzB,CAAC;6CAGf,CAAA;2CAAyD,CAAC;+CAA6D,CAAC;wDAAsE,CAAC;4CAA0D,CAAC;;sCAAuE,CAAC;;wBAAmE,CAAC;;sCAA0E,CAAC;;4BAAuE,CAAC;;;;;;;;;;;;IAxCvhB,MAAM,OAAO,UAAW,SAAQ,eAQ9B;KAAG;;;;;;;;;;;;;;8BAgCu5P,CAAC;;;6CAAiI,CAAC;;oCAAmF,CAAC;;uCAA4G,CAAC;gCAA8C,CAAC;kCAAgD,CAAC;iCAAkG,CAAC;mCAAiD,CAAC;;6BAA2E,CAAC;gCAA8C,CAAC;qCAAmD,CAAC;gCAA8C,CAAC;gCAA8C,CAAC;kCAAgD,CAAC;6BAA2C,CAAC;8BAA4C,CAAC;;0CAAkF,CAAC;;kCAAiF,CAAC;;0CAAkF,CAAC;;oCAAmF,CAAC;;0CAAkF,CAAC;;iCAAgF,CAAC;;+CAAiF,CAAC;iDAA+D,CAAC;iDAA+D,CAAC;+CAA6D,CAAC;mDAAiE,CAAC;4DAA0E,CAAC;gDAA8D,CAAC;;0CAA+E,CAAC;;4BAA2E,CAAC;;0CAAkF,CAAC;;gCAA+E,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA9BvnU,MAAM,OAAO,aAAc,SAAQ,kBASjC;KAAG;;CACN;AAED,eAAO,MAAM,oBAAoB,mCAAoC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElF,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,KAAK,SAAS,GAAG,MAAM,CAAC;AACxB,MAAM,MAAM,SAAS,GAAG;IAAE,mBAAmB,EAAE,OAAO,CAAA;CAAE,CAAC;AACzD,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG;IACxB,gCAAgC;IAChC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/C,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,MAAM,MAAM,yBAAyB,GAAG,CAAC,WAAW,EAAE,SAAS,GAAG,SAAS,KAAK,eAAe,CAAC;AAEhG,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,MAAM,MAAM,yBAAyB,GAAG,CAAC,WAAW,EAAE,SAAS,GAAG,SAAS,KAAK,eAAe,CAAC;AAEhG,eAAO,MAAM,kBAAkB,GAAI,IAAI,MAAM,EAAE,WAAW,QAAQ,KAAG,eAapE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"5.
|
|
1
|
+
{"version":"5.8.3"}
|
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.fbd8ed0",
|
|
4
4
|
"description": "DXOS Threads Surface plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -39,52 +39,59 @@
|
|
|
39
39
|
"@preact/signals-core": "^1.6.0",
|
|
40
40
|
"date-fns": "^3.3.1",
|
|
41
41
|
"lodash.get": "^4.4.2",
|
|
42
|
-
"@dxos/app-framework": "0.8.2-main.
|
|
43
|
-
"@dxos/async": "0.8.2-main.
|
|
44
|
-
"@dxos/display-name": "0.8.2-main.
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/echo-schema": "0.8.2-main.
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/plugin-
|
|
53
|
-
"@dxos/plugin-
|
|
54
|
-
"@dxos/plugin-deck": "0.8.2-main.
|
|
55
|
-
"@dxos/plugin-
|
|
56
|
-
"@dxos/plugin-
|
|
57
|
-
"@dxos/plugin-
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/react-ui-attention": "0.8.2-main.
|
|
60
|
-
"@dxos/react-
|
|
61
|
-
"@dxos/react-ui-editor": "0.8.2-main.
|
|
62
|
-
"@dxos/react-ui-
|
|
63
|
-
"@dxos/react-ui-menu": "0.8.2-main.
|
|
64
|
-
"@dxos/react-ui-
|
|
65
|
-
"@dxos/react-ui-tabs": "0.8.2-main.
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
42
|
+
"@dxos/app-framework": "0.8.2-main.fbd8ed0",
|
|
43
|
+
"@dxos/async": "0.8.2-main.fbd8ed0",
|
|
44
|
+
"@dxos/display-name": "0.8.2-main.fbd8ed0",
|
|
45
|
+
"@dxos/echo": "0.8.2-main.fbd8ed0",
|
|
46
|
+
"@dxos/echo-schema": "0.8.2-main.fbd8ed0",
|
|
47
|
+
"@dxos/invariant": "0.8.2-main.fbd8ed0",
|
|
48
|
+
"@dxos/local-storage": "0.8.2-main.fbd8ed0",
|
|
49
|
+
"@dxos/live-object": "0.8.2-main.fbd8ed0",
|
|
50
|
+
"@dxos/keys": "0.8.2-main.fbd8ed0",
|
|
51
|
+
"@dxos/log": "0.8.2-main.fbd8ed0",
|
|
52
|
+
"@dxos/plugin-attention": "0.8.2-main.fbd8ed0",
|
|
53
|
+
"@dxos/plugin-client": "0.8.2-main.fbd8ed0",
|
|
54
|
+
"@dxos/plugin-deck": "0.8.2-main.fbd8ed0",
|
|
55
|
+
"@dxos/plugin-markdown": "0.8.2-main.fbd8ed0",
|
|
56
|
+
"@dxos/plugin-graph": "0.8.2-main.fbd8ed0",
|
|
57
|
+
"@dxos/plugin-observability": "0.8.2-main.fbd8ed0",
|
|
58
|
+
"@dxos/plugin-space": "0.8.2-main.fbd8ed0",
|
|
59
|
+
"@dxos/react-ui-attention": "0.8.2-main.fbd8ed0",
|
|
60
|
+
"@dxos/react-client": "0.8.2-main.fbd8ed0",
|
|
61
|
+
"@dxos/react-ui-editor": "0.8.2-main.fbd8ed0",
|
|
62
|
+
"@dxos/react-ui-form": "0.8.2-main.fbd8ed0",
|
|
63
|
+
"@dxos/react-ui-menu": "0.8.2-main.fbd8ed0",
|
|
64
|
+
"@dxos/react-ui-stack": "0.8.2-main.fbd8ed0",
|
|
65
|
+
"@dxos/react-ui-tabs": "0.8.2-main.fbd8ed0",
|
|
66
|
+
"@dxos/react-ui-thread": "0.8.2-main.fbd8ed0",
|
|
67
|
+
"@dxos/schema": "0.8.2-main.fbd8ed0",
|
|
68
|
+
"@dxos/util": "0.8.2-main.fbd8ed0"
|
|
68
69
|
},
|
|
69
70
|
"devDependencies": {
|
|
71
|
+
"@effect-rx/rx-react": "^0.34.1",
|
|
72
|
+
"@effect/platform": "0.80.12",
|
|
70
73
|
"@phosphor-icons/react": "^2.1.5",
|
|
71
74
|
"@types/lodash.get": "^4.4.7",
|
|
72
75
|
"@types/react": "~18.2.0",
|
|
73
76
|
"@types/react-dom": "~18.2.0",
|
|
77
|
+
"effect": "3.14.21",
|
|
74
78
|
"react": "~18.2.0",
|
|
75
79
|
"react-dom": "~18.2.0",
|
|
76
80
|
"vite": "5.4.7",
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/storybook-utils": "0.8.2-main.
|
|
80
|
-
"@dxos/react-ui-theme": "0.8.2-main.
|
|
81
|
+
"@dxos/random": "0.8.2-main.fbd8ed0",
|
|
82
|
+
"@dxos/react-ui": "0.8.2-main.fbd8ed0",
|
|
83
|
+
"@dxos/storybook-utils": "0.8.2-main.fbd8ed0",
|
|
84
|
+
"@dxos/react-ui-theme": "0.8.2-main.fbd8ed0"
|
|
81
85
|
},
|
|
82
86
|
"peerDependencies": {
|
|
87
|
+
"@effect-rx/rx-react": "^0.34.1",
|
|
88
|
+
"@effect/platform": "0.80.12",
|
|
83
89
|
"@phosphor-icons/react": "^2.1.5",
|
|
90
|
+
"effect": "^3.13.3",
|
|
84
91
|
"react": "~18.2.0",
|
|
85
92
|
"react-dom": "~18.2.0",
|
|
86
|
-
"@dxos/react-ui
|
|
87
|
-
"@dxos/react-ui": "0.8.2-main.
|
|
93
|
+
"@dxos/react-ui": "0.8.2-main.fbd8ed0",
|
|
94
|
+
"@dxos/react-ui-theme": "0.8.2-main.fbd8ed0"
|
|
88
95
|
},
|
|
89
96
|
"publishConfig": {
|
|
90
97
|
"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 AnyLiveObject, RefArray } from '@dxos/react-client/echo';
|
|
11
11
|
import { translations as threadTranslations } from '@dxos/react-ui-thread';
|
|
12
|
-
import {
|
|
12
|
+
import { DataType } 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: DataType.Message.typename,
|
|
62
62
|
metadata: {
|
|
63
63
|
// TODO(wittjosiah): Move out of metadata.
|
|
64
|
-
loadReferences: (message:
|
|
64
|
+
loadReferences: (message: DataType.Message) => [], // 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: AnyLiveObject<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, DataType.Message, DataType.MessageV1]),
|
|
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, [DataType.MessageV1ToV2]),
|
|
105
105
|
}),
|
|
106
106
|
defineModule({
|
|
107
107
|
id: `${meta.id}/module/markdown`,
|
|
@@ -2,33 +2,43 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Rx } from '@effect-rx/rx-react';
|
|
6
|
+
import { Option, pipe } from 'effect';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';
|
|
7
9
|
import { PLANK_COMPANION_TYPE, ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';
|
|
8
|
-
import { createExtension
|
|
10
|
+
import { createExtension } from '@dxos/plugin-graph';
|
|
11
|
+
import { isLiveObject } from '@dxos/react-client/echo';
|
|
9
12
|
|
|
10
13
|
import { meta } from '../meta';
|
|
11
14
|
|
|
12
|
-
export default (context:
|
|
15
|
+
export default (context: PluginContext) =>
|
|
13
16
|
contributes(Capabilities.AppGraphBuilder, [
|
|
14
17
|
createExtension({
|
|
15
18
|
id: `${meta.id}/comments`,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
connector: (node) =>
|
|
20
|
+
Rx.make((get) =>
|
|
21
|
+
pipe(
|
|
22
|
+
get(node),
|
|
23
|
+
Option.flatMap((node) =>
|
|
24
|
+
// TODO(wittjosiah): Support comments on any object.
|
|
25
|
+
isLiveObject(node.data) && Array.isArray(node.data.threads) ? Option.some(node) : Option.none(),
|
|
26
|
+
),
|
|
27
|
+
Option.map((node) => [
|
|
28
|
+
{
|
|
29
|
+
id: [node.id, 'comments'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
30
|
+
type: PLANK_COMPANION_TYPE,
|
|
31
|
+
data: 'comments',
|
|
32
|
+
properties: {
|
|
33
|
+
label: ['comments label', { ns: meta.id }],
|
|
34
|
+
icon: 'ph--chat-text--regular',
|
|
35
|
+
disposition: 'hidden',
|
|
36
|
+
position: 'hoist',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
]),
|
|
40
|
+
Option.getOrElse(() => []),
|
|
41
|
+
),
|
|
42
|
+
),
|
|
33
43
|
}),
|
|
34
44
|
]);
|