@cossistant/react 0.0.32 → 0.1.0

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 (145) hide show
  1. package/README.md +3 -3
  2. package/hooks/index.d.ts +2 -2
  3. package/hooks/index.js +2 -2
  4. package/hooks/private/store/use-store-selector.d.ts.map +1 -1
  5. package/hooks/private/store/use-store-selector.js +8 -4
  6. package/hooks/private/store/use-store-selector.js.map +1 -1
  7. package/hooks/private/use-client-query.js +5 -2
  8. package/hooks/private/use-client-query.js.map +1 -1
  9. package/hooks/private/use-grouped-messages.d.ts +27 -2
  10. package/hooks/private/use-grouped-messages.d.ts.map +1 -1
  11. package/hooks/private/use-grouped-messages.js +154 -106
  12. package/hooks/private/use-grouped-messages.js.map +1 -1
  13. package/hooks/private/use-rest-client.js +2 -1
  14. package/hooks/private/use-rest-client.js.map +1 -1
  15. package/hooks/use-conversation-auto-seen.d.ts.map +1 -1
  16. package/hooks/use-conversation-auto-seen.js +9 -3
  17. package/hooks/use-conversation-auto-seen.js.map +1 -1
  18. package/hooks/use-conversation-page.d.ts.map +1 -1
  19. package/hooks/use-conversation-page.js +13 -3
  20. package/hooks/use-conversation-page.js.map +1 -1
  21. package/hooks/use-new-message-sound.d.ts.map +1 -1
  22. package/hooks/use-new-message-sound.js +2 -2
  23. package/hooks/use-new-message-sound.js.map +1 -1
  24. package/hooks/use-typing-sound.d.ts.map +1 -1
  25. package/hooks/use-typing-sound.js +2 -2
  26. package/hooks/use-typing-sound.js.map +1 -1
  27. package/index.d.ts +3 -3
  28. package/index.js +3 -3
  29. package/package.json +6 -12
  30. package/packages/tiny-markdown/src/context/index.d.ts +1 -0
  31. package/packages/tiny-markdown/src/context/tiny-markdown-context.d.ts +3 -0
  32. package/packages/tiny-markdown/src/hooks/index.d.ts +4 -0
  33. package/packages/tiny-markdown/src/hooks/use-caret-position.d.ts +1 -0
  34. package/packages/tiny-markdown/src/hooks/use-tiny-markdown.d.ts +1 -0
  35. package/packages/tiny-markdown/src/hooks/use-tiny-mention.d.ts +1 -0
  36. package/packages/tiny-markdown/src/hooks/use-tiny-shortcuts.d.ts +1 -0
  37. package/packages/tiny-markdown/src/index.d.ts +4 -0
  38. package/packages/tiny-markdown/src/types.d.ts +75 -0
  39. package/packages/tiny-markdown/src/types.d.ts.map +1 -0
  40. package/packages/tiny-markdown/src/utils/index.d.ts +3 -0
  41. package/packages/tiny-markdown/src/utils/markdown-parser.d.ts +1 -0
  42. package/packages/tiny-markdown/src/utils/mention-parser.d.ts +1 -0
  43. package/packages/tiny-markdown/src/utils/merge-refs.d.ts +1 -0
  44. package/packages/types/src/api/conversation.d.ts +300 -0
  45. package/packages/types/src/api/conversation.d.ts.map +1 -1
  46. package/packages/types/src/api/timeline-item.d.ts +225 -0
  47. package/packages/types/src/api/timeline-item.d.ts.map +1 -1
  48. package/packages/types/src/realtime-events.d.ts +228 -3
  49. package/packages/types/src/realtime-events.d.ts.map +1 -1
  50. package/packages/types/src/schemas.d.ts +75 -0
  51. package/packages/types/src/schemas.d.ts.map +1 -1
  52. package/primitives/avatar/image.d.ts +1 -1
  53. package/primitives/command-block-utils.d.ts +26 -0
  54. package/primitives/command-block-utils.d.ts.map +1 -0
  55. package/primitives/command-block-utils.js +310 -0
  56. package/primitives/command-block-utils.js.map +1 -0
  57. package/primitives/index.d.ts +7 -3
  58. package/primitives/index.js +11 -2
  59. package/primitives/index.parts.d.ts +6 -2
  60. package/primitives/index.parts.js +5 -1
  61. package/primitives/timeline-code-block.d.ts +32 -0
  62. package/primitives/timeline-code-block.d.ts.map +1 -0
  63. package/primitives/timeline-code-block.js +66 -0
  64. package/primitives/timeline-code-block.js.map +1 -0
  65. package/primitives/timeline-command-block.d.ts +29 -0
  66. package/primitives/timeline-command-block.d.ts.map +1 -0
  67. package/primitives/timeline-command-block.js +97 -0
  68. package/primitives/timeline-command-block.js.map +1 -0
  69. package/primitives/timeline-item-group.d.ts.map +1 -1
  70. package/primitives/timeline-item-group.js +5 -15
  71. package/primitives/timeline-item-group.js.map +1 -1
  72. package/primitives/timeline-item.d.ts +21 -1
  73. package/primitives/timeline-item.d.ts.map +1 -1
  74. package/primitives/timeline-item.js +148 -83
  75. package/primitives/timeline-item.js.map +1 -1
  76. package/primitives/timeline-message-layout.d.ts +9 -0
  77. package/primitives/timeline-message-layout.d.ts.map +1 -0
  78. package/primitives/timeline-message-layout.js +20 -0
  79. package/primitives/timeline-message-layout.js.map +1 -0
  80. package/provider.d.ts.map +1 -1
  81. package/provider.js +1 -7
  82. package/provider.js.map +1 -1
  83. package/realtime/event-filter.js +4 -3
  84. package/realtime/event-filter.js.map +1 -1
  85. package/realtime/provider.d.ts +0 -1
  86. package/realtime/provider.d.ts.map +1 -1
  87. package/realtime/provider.js +29 -34
  88. package/realtime/provider.js.map +1 -1
  89. package/sounds/sound-data.d.ts +6 -0
  90. package/sounds/sound-data.d.ts.map +1 -0
  91. package/sounds/sound-data.js +7 -0
  92. package/sounds/sound-data.js.map +1 -0
  93. package/styles.css +2 -0
  94. package/support/components/avatar.js +3 -3
  95. package/support/components/avatar.js.map +1 -1
  96. package/support/components/button.d.ts +2 -2
  97. package/support/components/button.d.ts.map +1 -1
  98. package/support/components/button.js +1 -0
  99. package/support/components/button.js.map +1 -1
  100. package/support/components/conversation-event.d.ts +3 -0
  101. package/support/components/conversation-event.d.ts.map +1 -1
  102. package/support/components/conversation-event.js +47 -16
  103. package/support/components/conversation-event.js.map +1 -1
  104. package/support/components/conversation-timeline.d.ts.map +1 -1
  105. package/support/components/conversation-timeline.js +12 -0
  106. package/support/components/conversation-timeline.js.map +1 -1
  107. package/support/components/index.d.ts +2 -1
  108. package/support/components/index.js +2 -1
  109. package/support/components/timeline-activity-group.d.ts +25 -0
  110. package/support/components/timeline-activity-group.d.ts.map +1 -0
  111. package/support/components/timeline-activity-group.js +104 -0
  112. package/support/components/timeline-activity-group.js.map +1 -0
  113. package/support/components/timeline-code-block.d.ts +14 -0
  114. package/support/components/timeline-code-block.d.ts.map +1 -0
  115. package/support/components/timeline-code-block.js +44 -0
  116. package/support/components/timeline-code-block.js.map +1 -0
  117. package/support/components/timeline-command-block.d.ts +12 -0
  118. package/support/components/timeline-command-block.d.ts.map +1 -0
  119. package/support/components/timeline-command-block.js +42 -0
  120. package/support/components/timeline-command-block.js.map +1 -0
  121. package/support/components/timeline-message-item.d.ts +2 -1
  122. package/support/components/timeline-message-item.d.ts.map +1 -1
  123. package/support/components/timeline-message-item.js +23 -3
  124. package/support/components/timeline-message-item.js.map +1 -1
  125. package/support/pages/home.js +1 -1
  126. package/support/pages/home.js.map +1 -1
  127. package/support/store/support-store.d.ts.map +1 -1
  128. package/support/store/support-store.js +4 -4
  129. package/support/store/support-store.js.map +1 -1
  130. package/support/{support-DmViRaga.css → support-Dc5L__HC.css} +15 -15
  131. package/support/{support-DmViRaga.css.map → support-Dc5L__HC.css.map} +1 -1
  132. package/{tailwind.css → support/support.css} +14 -14
  133. package/support-config.d.ts +31 -4
  134. package/support-config.d.ts.map +1 -1
  135. package/support-config.js +52 -4
  136. package/support-config.js.map +1 -1
  137. package/support.css +1 -2
  138. package/utils/metadata-hash.d.ts +1 -1
  139. package/utils/metadata-hash.js +9 -4
  140. package/utils/metadata-hash.js.map +1 -1
  141. package/utils/timeline-item-sender.d.ts +17 -0
  142. package/utils/timeline-item-sender.d.ts.map +1 -0
  143. package/utils/timeline-item-sender.js +43 -0
  144. package/utils/timeline-item-sender.js.map +1 -0
  145. package/utils/use-render-element.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"realtime-events.d.ts","names":[],"sources":["../../../../../types/src/realtime-events.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAsBa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6WD,iBAAA,gBAAiC;KAEjC,+BAA+B,qBAAqB,eACvD,gBAAgB;KAGb,wBAAwB;QAC7B;WACG,qBAAqB;;KAGnB,gBAAA,WACL,oBAAoB,cAAc,KACvC;KAEU,4BAA4B,qBACvC,qBAAqB"}
@@ -58,6 +58,19 @@ declare const conversationSchema: ZodObject<{
58
58
  }>>;
59
59
  progressMessage: ZodOptional<ZodString>;
60
60
  knowledgeId: ZodOptional<ZodString>;
61
+ toolTimeline: ZodOptional<ZodObject<{
62
+ logType: ZodEnum<{
63
+ log: "log";
64
+ customer_facing: "customer_facing";
65
+ decision: "decision";
66
+ }>;
67
+ triggerMessageId: ZodString;
68
+ workflowRunId: ZodString;
69
+ triggerVisibility: ZodOptional<ZodEnum<{
70
+ public: "public";
71
+ private: "private";
72
+ }>>;
73
+ }, $strip>>;
61
74
  }, $strip>>;
62
75
  }, $loose>>;
63
76
  }, $strip>, ZodObject<{
@@ -72,6 +85,29 @@ declare const conversationSchema: ZodObject<{
72
85
  partial: "partial";
73
86
  }>;
74
87
  errorText: ZodOptional<ZodString>;
88
+ callProviderMetadata: ZodOptional<ZodObject<{
89
+ cossistant: ZodOptional<ZodObject<{
90
+ visibility: ZodOptional<ZodEnum<{
91
+ public: "public";
92
+ private: "private";
93
+ }>>;
94
+ progressMessage: ZodOptional<ZodString>;
95
+ knowledgeId: ZodOptional<ZodString>;
96
+ toolTimeline: ZodOptional<ZodObject<{
97
+ logType: ZodEnum<{
98
+ log: "log";
99
+ customer_facing: "customer_facing";
100
+ decision: "decision";
101
+ }>;
102
+ triggerMessageId: ZodString;
103
+ workflowRunId: ZodString;
104
+ triggerVisibility: ZodOptional<ZodEnum<{
105
+ public: "public";
106
+ private: "private";
107
+ }>>;
108
+ }, $strip>>;
109
+ }, $strip>>;
110
+ }, $loose>>;
75
111
  providerMetadata: ZodOptional<ZodObject<{
76
112
  cossistant: ZodOptional<ZodObject<{
77
113
  visibility: ZodOptional<ZodEnum<{
@@ -80,6 +116,19 @@ declare const conversationSchema: ZodObject<{
80
116
  }>>;
81
117
  progressMessage: ZodOptional<ZodString>;
82
118
  knowledgeId: ZodOptional<ZodString>;
119
+ toolTimeline: ZodOptional<ZodObject<{
120
+ logType: ZodEnum<{
121
+ log: "log";
122
+ customer_facing: "customer_facing";
123
+ decision: "decision";
124
+ }>;
125
+ triggerMessageId: ZodString;
126
+ workflowRunId: ZodString;
127
+ triggerVisibility: ZodOptional<ZodEnum<{
128
+ public: "public";
129
+ private: "private";
130
+ }>>;
131
+ }, $strip>>;
83
132
  }, $strip>>;
84
133
  }, $loose>>;
85
134
  }, $strip>, ZodObject<{
@@ -95,6 +144,19 @@ declare const conversationSchema: ZodObject<{
95
144
  }>>;
96
145
  progressMessage: ZodOptional<ZodString>;
97
146
  knowledgeId: ZodOptional<ZodString>;
147
+ toolTimeline: ZodOptional<ZodObject<{
148
+ logType: ZodEnum<{
149
+ log: "log";
150
+ customer_facing: "customer_facing";
151
+ decision: "decision";
152
+ }>;
153
+ triggerMessageId: ZodString;
154
+ workflowRunId: ZodString;
155
+ triggerVisibility: ZodOptional<ZodEnum<{
156
+ public: "public";
157
+ private: "private";
158
+ }>>;
159
+ }, $strip>>;
98
160
  }, $strip>>;
99
161
  }, $loose>>;
100
162
  }, $strip>, ZodObject<{
@@ -111,6 +173,19 @@ declare const conversationSchema: ZodObject<{
111
173
  }>>;
112
174
  progressMessage: ZodOptional<ZodString>;
113
175
  knowledgeId: ZodOptional<ZodString>;
176
+ toolTimeline: ZodOptional<ZodObject<{
177
+ logType: ZodEnum<{
178
+ log: "log";
179
+ customer_facing: "customer_facing";
180
+ decision: "decision";
181
+ }>;
182
+ triggerMessageId: ZodString;
183
+ workflowRunId: ZodString;
184
+ triggerVisibility: ZodOptional<ZodEnum<{
185
+ public: "public";
186
+ private: "private";
187
+ }>>;
188
+ }, $strip>>;
114
189
  }, $strip>>;
115
190
  }, $loose>>;
116
191
  }, $strip>, ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","names":[],"sources":["../../../../../types/src/schemas.ts"],"sourcesContent":[],"mappings":";;;;;;cAkBa,oBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqBnB,YAAA,GAAe,cAAe;cAE7B,wBAAsB;;;;;;;;;EAvBJ,SAAA,aAAA,UAAA,CAAA;CAAA,QAAA,CAAA;AAqBnB,KAcA,gBAAA,GAAmB,MAdW,CAAA,OAcI,sBAdZ,CAAA"}
1
+ {"version":3,"file":"schemas.d.ts","names":[],"sources":["../../../../../types/src/schemas.ts"],"sourcesContent":[],"mappings":";;;;;;cAkBa,oBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAA,MAAA,SAAA,CAAA;QAAA,KAAA,EAAA,OAAA;QAqBnB,MAAY,EAAA,QAAkB;QAE7B,GAAA,EAAA,KAAA;;;;;;;;;;KAFD,YAAA,GAAe,cAAe;cAE7B,wBAAsB;;;;EAAA,SAAA,aAAA,UAAA,CAAA;EAAA,SAAA,aAAA,UAAA,CAAA;EAYvB,UAAA,WAAgB;;;;;KAAhB,gBAAA,GAAmB,cAAe"}
@@ -15,7 +15,7 @@ type AvatarImageProps = Omit<React$1.ImgHTMLAttributes<HTMLImageElement>, "src"
15
15
  * Controlled `<img>` that syncs its loading status back to the avatar context
16
16
  * so fallbacks know when to display.
17
17
  */
18
- declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<React$1.ImgHTMLAttributes<HTMLImageElement>, "src" | "alt"> & {
18
+ declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<React$1.ImgHTMLAttributes<HTMLImageElement>, "alt" | "src"> & {
19
19
  src: string;
20
20
  alt?: string;
21
21
  asChild?: boolean;
@@ -0,0 +1,26 @@
1
+ import { MarkdownToken } from "../packages/tiny-markdown/src/types.js";
2
+ import "../packages/tiny-markdown/src/index.js";
3
+
4
+ //#region src/primitives/command-block-utils.d.ts
5
+ declare const COMMAND_PREFERENCE_STORAGE_KEY = "cossistant:package-manager";
6
+ declare const COMMAND_PREFERENCE_EVENT = "cossistant:package-manager-change";
7
+ declare const DEFAULT_PACKAGE_MANAGER: "npm";
8
+ declare const COMMAND_PACKAGE_MANAGERS: readonly ["npm", "yarn", "pnpm", "bun"];
9
+ type CommandPackageManager = (typeof COMMAND_PACKAGE_MANAGERS)[number];
10
+ type CommandVariants = Record<CommandPackageManager, string>;
11
+ declare function isCommandPackageManager(value: string): value is CommandPackageManager;
12
+ type StandaloneInlineCommand = {
13
+ command: string;
14
+ variants: CommandVariants;
15
+ };
16
+ type InlineParagraphCommand = {
17
+ command: string;
18
+ variants: CommandVariants;
19
+ index: number;
20
+ };
21
+ declare function mapCommandVariants(input: string): CommandVariants | null;
22
+ declare function mapStandaloneInlineCommandFromParagraphChildren(children: MarkdownToken[]): StandaloneInlineCommand | null;
23
+ declare function mapInlineCommandFromParagraphChildren(children: MarkdownToken[]): InlineParagraphCommand | null;
24
+ //#endregion
25
+ export { COMMAND_PACKAGE_MANAGERS, COMMAND_PREFERENCE_EVENT, COMMAND_PREFERENCE_STORAGE_KEY, CommandPackageManager, CommandVariants, DEFAULT_PACKAGE_MANAGER, InlineParagraphCommand, StandaloneInlineCommand, isCommandPackageManager, mapCommandVariants, mapInlineCommandFromParagraphChildren, mapStandaloneInlineCommandFromParagraphChildren };
26
+ //# sourceMappingURL=command-block-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-block-utils.d.ts","names":[],"sources":["../../src/primitives/command-block-utils.ts"],"sourcesContent":[],"mappings":";;;;cAEa,8BAAA;cACA,wBAAA;cACA;AAFA,cAIA,wBAJ8B,EAAA,SAAA,CAAA,KAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,CAAA;AAC9B,KAKD,qBAAA,GALyB,CAAA,OAKO,wBALP,CAAA,CAAA,MAAA,CAAA;AACxB,KAMD,eAAA,GAAkB,MANuB,CAMhB,qBANgB,EAAA,MAAA,CAAA;AAExC,iBAMG,uBAAA,CAN+D,KAAA,EAAA,MAAA,CAAA,EAAA,KAAA,IAQnE,qBARmE;AAEnE,KAiBA,uBAAA,GAjBqB;EAErB,OAAA,EAAA,MAAA;EAEI,QAAA,EAeL,eAfK;AAahB,CAAA;AAKY,KAAA,sBAAA,GAAsB;EAiTlB,OAAA,EAAA,MAAA;EASA,QAAA,EAxTL,eAwTK;EAqCA,KAAA,EAAA,MAAA;;iBA9CA,kBAAA,iBAAmC;iBASnC,+CAAA,WACL,kBACR;iBAmCa,qCAAA,WACL,kBACR"}
@@ -0,0 +1,310 @@
1
+ //#region src/primitives/command-block-utils.ts
2
+ const COMMAND_PREFERENCE_STORAGE_KEY = "cossistant:package-manager";
3
+ const COMMAND_PREFERENCE_EVENT = "cossistant:package-manager-change";
4
+ const DEFAULT_PACKAGE_MANAGER = "npm";
5
+ const COMMAND_PACKAGE_MANAGERS = [
6
+ "npm",
7
+ "yarn",
8
+ "pnpm",
9
+ "bun"
10
+ ];
11
+ function isCommandPackageManager(value) {
12
+ return COMMAND_PACKAGE_MANAGERS.includes(value);
13
+ }
14
+ function normalizeInput(input) {
15
+ const normalized = input.replace(/\s+/g, " ").trim();
16
+ if (!normalized || normalized.includes("\n") || normalized.includes("\r")) return null;
17
+ return normalized;
18
+ }
19
+ function splitCommand(command) {
20
+ return command.split(/\s+/).filter(Boolean);
21
+ }
22
+ function joinArgs(tokens) {
23
+ if (tokens.length === 0) return null;
24
+ const args = tokens.join(" ").trim();
25
+ return args.length > 0 ? args : null;
26
+ }
27
+ function getNormalizedFromNpx(tokens) {
28
+ const firstArg = tokens[1];
29
+ if (!firstArg) return null;
30
+ if (firstArg.startsWith("create-")) {
31
+ const createdName = firstArg.slice(7);
32
+ if (!createdName) return null;
33
+ const args$1 = joinArgs([createdName, ...tokens.slice(2)]);
34
+ if (!args$1) return null;
35
+ return {
36
+ intent: "npx-create",
37
+ args: args$1
38
+ };
39
+ }
40
+ const args = joinArgs(tokens.slice(1));
41
+ if (!args) return null;
42
+ return {
43
+ intent: "exec",
44
+ args
45
+ };
46
+ }
47
+ function getNormalizedFromNpm(tokens) {
48
+ const action = tokens[1];
49
+ if (!action) return null;
50
+ if (action === "install") {
51
+ const args = joinArgs(tokens.slice(2));
52
+ return args ? {
53
+ intent: "install",
54
+ args
55
+ } : null;
56
+ }
57
+ if (action === "run") {
58
+ const args = joinArgs(tokens.slice(2));
59
+ return args ? {
60
+ intent: "run",
61
+ args
62
+ } : null;
63
+ }
64
+ if (action === "create") {
65
+ const args = joinArgs(tokens.slice(2));
66
+ return args ? {
67
+ intent: "create",
68
+ args
69
+ } : null;
70
+ }
71
+ return null;
72
+ }
73
+ function getNormalizedFromPnpm(tokens) {
74
+ const action = tokens[1];
75
+ if (!action) return null;
76
+ if (action === "add") {
77
+ const args = joinArgs(tokens.slice(2));
78
+ return args ? {
79
+ intent: "install",
80
+ args
81
+ } : null;
82
+ }
83
+ if (action === "run") {
84
+ const args = joinArgs(tokens.slice(2));
85
+ return args ? {
86
+ intent: "run",
87
+ args
88
+ } : null;
89
+ }
90
+ if (action === "create") {
91
+ const args = joinArgs(tokens.slice(2));
92
+ return args ? {
93
+ intent: "create",
94
+ args
95
+ } : null;
96
+ }
97
+ if (action === "dlx") {
98
+ const args = joinArgs(tokens.slice(2));
99
+ if (!args) return null;
100
+ if (tokens[2]?.startsWith("create-")) {
101
+ const createArgs = joinArgs([tokens[2].slice(7), ...tokens.slice(3)]);
102
+ return createArgs ? {
103
+ intent: "npx-create",
104
+ args: createArgs
105
+ } : null;
106
+ }
107
+ return {
108
+ intent: "exec",
109
+ args
110
+ };
111
+ }
112
+ if (action.startsWith("-")) return null;
113
+ const shorthandRunArgs = joinArgs(tokens.slice(1));
114
+ return shorthandRunArgs ? {
115
+ intent: "run",
116
+ args: shorthandRunArgs
117
+ } : null;
118
+ }
119
+ function getNormalizedFromYarn(tokens) {
120
+ const action = tokens[1];
121
+ if (!action) return null;
122
+ if (action === "add") {
123
+ const args = joinArgs(tokens.slice(2));
124
+ return args ? {
125
+ intent: "install",
126
+ args
127
+ } : null;
128
+ }
129
+ if (action === "run") {
130
+ const args = joinArgs(tokens.slice(2));
131
+ return args ? {
132
+ intent: "run",
133
+ args
134
+ } : null;
135
+ }
136
+ if (action === "create") {
137
+ const args = joinArgs(tokens.slice(2));
138
+ return args ? {
139
+ intent: "create",
140
+ args
141
+ } : null;
142
+ }
143
+ if (action === "dlx") {
144
+ const args = joinArgs(tokens.slice(2));
145
+ if (!args) return null;
146
+ if (tokens[2]?.startsWith("create-")) {
147
+ const createArgs = joinArgs([tokens[2].slice(7), ...tokens.slice(3)]);
148
+ return createArgs ? {
149
+ intent: "npx-create",
150
+ args: createArgs
151
+ } : null;
152
+ }
153
+ return {
154
+ intent: "exec",
155
+ args
156
+ };
157
+ }
158
+ if (action.startsWith("-")) return null;
159
+ const shorthandRunArgs = joinArgs(tokens.slice(1));
160
+ return shorthandRunArgs ? {
161
+ intent: "run",
162
+ args: shorthandRunArgs
163
+ } : null;
164
+ }
165
+ function getNormalizedFromBun(tokens) {
166
+ const action = tokens[1];
167
+ if (!action) return null;
168
+ if (action === "add") {
169
+ const args = joinArgs(tokens.slice(2));
170
+ return args ? {
171
+ intent: "install",
172
+ args
173
+ } : null;
174
+ }
175
+ if (action === "run") {
176
+ const args = joinArgs(tokens.slice(2));
177
+ return args ? {
178
+ intent: "run",
179
+ args
180
+ } : null;
181
+ }
182
+ if (action === "create") {
183
+ const args = joinArgs(tokens.slice(2));
184
+ return args ? {
185
+ intent: "create",
186
+ args
187
+ } : null;
188
+ }
189
+ if (action.startsWith("-")) return null;
190
+ const shorthandRunArgs = joinArgs(tokens.slice(1));
191
+ return shorthandRunArgs ? {
192
+ intent: "run",
193
+ args: shorthandRunArgs
194
+ } : null;
195
+ }
196
+ function getNormalizedFromBunx(tokens) {
197
+ let startIndex = 1;
198
+ if (tokens[1] === "--bun") startIndex = 2;
199
+ const firstArg = tokens[startIndex];
200
+ if (!firstArg) return null;
201
+ if (firstArg.startsWith("create-")) {
202
+ const createTarget = firstArg.slice(7);
203
+ if (!createTarget) return null;
204
+ const args$1 = joinArgs([createTarget, ...tokens.slice(startIndex + 1)]);
205
+ return args$1 ? {
206
+ intent: "npx-create",
207
+ args: args$1
208
+ } : null;
209
+ }
210
+ const args = joinArgs(tokens.slice(startIndex));
211
+ return args ? {
212
+ intent: "exec",
213
+ args
214
+ } : null;
215
+ }
216
+ function normalizeCommand(input) {
217
+ const normalizedInput = normalizeInput(input);
218
+ if (!normalizedInput) return null;
219
+ const tokens = splitCommand(normalizedInput);
220
+ const command = tokens[0];
221
+ if (!command) return null;
222
+ if (command === "npm") return getNormalizedFromNpm(tokens);
223
+ if (command === "npx") return getNormalizedFromNpx(tokens);
224
+ if (command === "pnpm") return getNormalizedFromPnpm(tokens);
225
+ if (command === "yarn") return getNormalizedFromYarn(tokens);
226
+ if (command === "bun") return getNormalizedFromBun(tokens);
227
+ if (command === "bunx") return getNormalizedFromBunx(tokens);
228
+ return null;
229
+ }
230
+ function toCommandVariants(command) {
231
+ switch (command.intent) {
232
+ case "install": return {
233
+ npm: `npm install ${command.args}`,
234
+ yarn: `yarn add ${command.args}`,
235
+ pnpm: `pnpm add ${command.args}`,
236
+ bun: `bun add ${command.args}`
237
+ };
238
+ case "run": return {
239
+ npm: `npm run ${command.args}`,
240
+ yarn: `yarn ${command.args}`,
241
+ pnpm: `pnpm ${command.args}`,
242
+ bun: `bun ${command.args}`
243
+ };
244
+ case "create": return {
245
+ npm: `npm create ${command.args}`,
246
+ yarn: `yarn create ${command.args}`,
247
+ pnpm: `pnpm create ${command.args}`,
248
+ bun: `bun create ${command.args}`
249
+ };
250
+ case "npx-create": return {
251
+ npm: `npx create-${command.args}`,
252
+ yarn: `yarn create ${command.args}`,
253
+ pnpm: `pnpm create ${command.args}`,
254
+ bun: `bunx --bun create-${command.args}`
255
+ };
256
+ case "exec": return {
257
+ npm: `npx ${command.args}`,
258
+ yarn: `yarn ${command.args}`,
259
+ pnpm: `pnpm dlx ${command.args}`,
260
+ bun: `bunx --bun ${command.args}`
261
+ };
262
+ default: {
263
+ const exhaustiveCheck = command.intent;
264
+ throw new Error(`Unhandled command intent: ${String(exhaustiveCheck)}`);
265
+ }
266
+ }
267
+ }
268
+ function mapCommandVariants(input) {
269
+ const normalizedCommand = normalizeCommand(input);
270
+ if (!normalizedCommand) return null;
271
+ return toCommandVariants(normalizedCommand);
272
+ }
273
+ function mapStandaloneInlineCommandFromParagraphChildren(children) {
274
+ let inlineCommand = null;
275
+ for (const child of children) {
276
+ if (child.type === "text" && child.content.trim().length === 0) continue;
277
+ if (child.type === "code" && child.inline) {
278
+ if (inlineCommand !== null) return null;
279
+ inlineCommand = child.content;
280
+ continue;
281
+ }
282
+ return null;
283
+ }
284
+ if (!inlineCommand) return null;
285
+ const variants = mapCommandVariants(inlineCommand);
286
+ if (!variants) return null;
287
+ return {
288
+ command: inlineCommand,
289
+ variants
290
+ };
291
+ }
292
+ function mapInlineCommandFromParagraphChildren(children) {
293
+ let inlineCommand = null;
294
+ for (const [index, child] of children.entries()) {
295
+ if (child.type !== "code" || !child.inline) continue;
296
+ const variants = mapCommandVariants(child.content);
297
+ if (!variants) continue;
298
+ if (inlineCommand) return null;
299
+ inlineCommand = {
300
+ command: child.content,
301
+ variants,
302
+ index
303
+ };
304
+ }
305
+ return inlineCommand;
306
+ }
307
+
308
+ //#endregion
309
+ export { COMMAND_PACKAGE_MANAGERS, COMMAND_PREFERENCE_EVENT, COMMAND_PREFERENCE_STORAGE_KEY, DEFAULT_PACKAGE_MANAGER, isCommandPackageManager, mapCommandVariants, mapInlineCommandFromParagraphChildren, mapStandaloneInlineCommandFromParagraphChildren };
310
+ //# sourceMappingURL=command-block-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-block-utils.js","names":["args","exhaustiveCheck: never","inlineCommand: string | null","inlineCommand: InlineParagraphCommand | null"],"sources":["../../src/primitives/command-block-utils.ts"],"sourcesContent":["import type { MarkdownToken } from \"@cossistant/tiny-markdown\";\n\nexport const COMMAND_PREFERENCE_STORAGE_KEY = \"cossistant:package-manager\";\nexport const COMMAND_PREFERENCE_EVENT = \"cossistant:package-manager-change\";\nexport const DEFAULT_PACKAGE_MANAGER = \"npm\" as const;\n\nexport const COMMAND_PACKAGE_MANAGERS = [\"npm\", \"yarn\", \"pnpm\", \"bun\"] as const;\n\nexport type CommandPackageManager = (typeof COMMAND_PACKAGE_MANAGERS)[number];\n\nexport type CommandVariants = Record<CommandPackageManager, string>;\n\nexport function isCommandPackageManager(\n\tvalue: string\n): value is CommandPackageManager {\n\treturn (COMMAND_PACKAGE_MANAGERS as readonly string[]).includes(value);\n}\n\ntype CommandIntent = \"install\" | \"run\" | \"create\" | \"npx-create\" | \"exec\";\n\ntype NormalizedCommand = {\n\tintent: CommandIntent;\n\targs: string;\n};\n\nexport type StandaloneInlineCommand = {\n\tcommand: string;\n\tvariants: CommandVariants;\n};\n\nexport type InlineParagraphCommand = {\n\tcommand: string;\n\tvariants: CommandVariants;\n\tindex: number;\n};\n\nfunction normalizeInput(input: string): string | null {\n\tconst normalized = input.replace(/\\s+/g, \" \").trim();\n\tif (!normalized || normalized.includes(\"\\n\") || normalized.includes(\"\\r\")) {\n\t\treturn null;\n\t}\n\n\treturn normalized;\n}\n\nfunction splitCommand(command: string): string[] {\n\treturn command.split(/\\s+/).filter(Boolean);\n}\n\nfunction joinArgs(tokens: string[]): string | null {\n\tif (tokens.length === 0) {\n\t\treturn null;\n\t}\n\n\tconst args = tokens.join(\" \").trim();\n\treturn args.length > 0 ? args : null;\n}\n\nfunction getNormalizedFromNpx(tokens: string[]): NormalizedCommand | null {\n\tconst firstArg = tokens[1];\n\tif (!firstArg) {\n\t\treturn null;\n\t}\n\n\tif (firstArg.startsWith(\"create-\")) {\n\t\tconst createdName = firstArg.slice(\"create-\".length);\n\t\tif (!createdName) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst args = joinArgs([createdName, ...tokens.slice(2)]);\n\t\tif (!args) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn { intent: \"npx-create\", args };\n\t}\n\n\tconst args = joinArgs(tokens.slice(1));\n\tif (!args) {\n\t\treturn null;\n\t}\n\n\treturn { intent: \"exec\", args };\n}\n\nfunction getNormalizedFromNpm(tokens: string[]): NormalizedCommand | null {\n\tconst action = tokens[1];\n\tif (!action) {\n\t\treturn null;\n\t}\n\n\tif (action === \"install\") {\n\t\tconst args = joinArgs(tokens.slice(2));\n\t\treturn args ? { intent: \"install\", args } : null;\n\t}\n\n\tif (action === \"run\") {\n\t\tconst args = joinArgs(tokens.slice(2));\n\t\treturn args ? { intent: \"run\", args } : null;\n\t}\n\n\tif (action === \"create\") {\n\t\tconst args = joinArgs(tokens.slice(2));\n\t\treturn args ? { intent: \"create\", args } : null;\n\t}\n\n\treturn null;\n}\n\nfunction getNormalizedFromPnpm(tokens: string[]): NormalizedCommand | null {\n\tconst action = tokens[1];\n\tif (!action) {\n\t\treturn null;\n\t}\n\n\tif (action === \"add\") {\n\t\tconst args = joinArgs(tokens.slice(2));\n\t\treturn args ? { intent: \"install\", args } : null;\n\t}\n\n\tif (action === \"run\") {\n\t\tconst args = joinArgs(tokens.slice(2));\n\t\treturn args ? { intent: \"run\", args } : null;\n\t}\n\n\tif (action === \"create\") {\n\t\tconst args = joinArgs(tokens.slice(2));\n\t\treturn args ? { intent: \"create\", args } : null;\n\t}\n\n\tif (action === \"dlx\") {\n\t\tconst args = joinArgs(tokens.slice(2));\n\t\tif (!args) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (tokens[2]?.startsWith(\"create-\")) {\n\t\t\tconst createTarget = tokens[2].slice(\"create-\".length);\n\t\t\tconst createArgs = joinArgs([createTarget, ...tokens.slice(3)]);\n\t\t\treturn createArgs ? { intent: \"npx-create\", args: createArgs } : null;\n\t\t}\n\n\t\treturn { intent: \"exec\", args };\n\t}\n\n\tif (action.startsWith(\"-\")) {\n\t\treturn null;\n\t}\n\n\tconst shorthandRunArgs = joinArgs(tokens.slice(1));\n\treturn shorthandRunArgs ? { intent: \"run\", args: shorthandRunArgs } : null;\n}\n\nfunction getNormalizedFromYarn(tokens: string[]): NormalizedCommand | null {\n\tconst action = tokens[1];\n\tif (!action) {\n\t\treturn null;\n\t}\n\n\tif (action === \"add\") {\n\t\tconst args = joinArgs(tokens.slice(2));\n\t\treturn args ? { intent: \"install\", args } : null;\n\t}\n\n\tif (action === \"run\") {\n\t\tconst args = joinArgs(tokens.slice(2));\n\t\treturn args ? { intent: \"run\", args } : null;\n\t}\n\n\tif (action === \"create\") {\n\t\tconst args = joinArgs(tokens.slice(2));\n\t\treturn args ? { intent: \"create\", args } : null;\n\t}\n\n\tif (action === \"dlx\") {\n\t\tconst args = joinArgs(tokens.slice(2));\n\t\tif (!args) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (tokens[2]?.startsWith(\"create-\")) {\n\t\t\tconst createTarget = tokens[2].slice(\"create-\".length);\n\t\t\tconst createArgs = joinArgs([createTarget, ...tokens.slice(3)]);\n\t\t\treturn createArgs ? { intent: \"npx-create\", args: createArgs } : null;\n\t\t}\n\n\t\treturn { intent: \"exec\", args };\n\t}\n\n\tif (action.startsWith(\"-\")) {\n\t\treturn null;\n\t}\n\n\tconst shorthandRunArgs = joinArgs(tokens.slice(1));\n\treturn shorthandRunArgs ? { intent: \"run\", args: shorthandRunArgs } : null;\n}\n\nfunction getNormalizedFromBun(tokens: string[]): NormalizedCommand | null {\n\tconst action = tokens[1];\n\tif (!action) {\n\t\treturn null;\n\t}\n\n\tif (action === \"add\") {\n\t\tconst args = joinArgs(tokens.slice(2));\n\t\treturn args ? { intent: \"install\", args } : null;\n\t}\n\n\tif (action === \"run\") {\n\t\tconst args = joinArgs(tokens.slice(2));\n\t\treturn args ? { intent: \"run\", args } : null;\n\t}\n\n\tif (action === \"create\") {\n\t\tconst args = joinArgs(tokens.slice(2));\n\t\treturn args ? { intent: \"create\", args } : null;\n\t}\n\n\tif (action.startsWith(\"-\")) {\n\t\treturn null;\n\t}\n\n\tconst shorthandRunArgs = joinArgs(tokens.slice(1));\n\treturn shorthandRunArgs ? { intent: \"run\", args: shorthandRunArgs } : null;\n}\n\nfunction getNormalizedFromBunx(tokens: string[]): NormalizedCommand | null {\n\tlet startIndex = 1;\n\tif (tokens[1] === \"--bun\") {\n\t\tstartIndex = 2;\n\t}\n\n\tconst firstArg = tokens[startIndex];\n\tif (!firstArg) {\n\t\treturn null;\n\t}\n\n\tif (firstArg.startsWith(\"create-\")) {\n\t\tconst createTarget = firstArg.slice(\"create-\".length);\n\t\tif (!createTarget) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst args = joinArgs([createTarget, ...tokens.slice(startIndex + 1)]);\n\t\treturn args ? { intent: \"npx-create\", args } : null;\n\t}\n\n\tconst args = joinArgs(tokens.slice(startIndex));\n\treturn args ? { intent: \"exec\", args } : null;\n}\n\nfunction normalizeCommand(input: string): NormalizedCommand | null {\n\tconst normalizedInput = normalizeInput(input);\n\tif (!normalizedInput) {\n\t\treturn null;\n\t}\n\n\tconst tokens = splitCommand(normalizedInput);\n\tconst command = tokens[0];\n\tif (!command) {\n\t\treturn null;\n\t}\n\n\tif (command === \"npm\") {\n\t\treturn getNormalizedFromNpm(tokens);\n\t}\n\n\tif (command === \"npx\") {\n\t\treturn getNormalizedFromNpx(tokens);\n\t}\n\n\tif (command === \"pnpm\") {\n\t\treturn getNormalizedFromPnpm(tokens);\n\t}\n\n\tif (command === \"yarn\") {\n\t\treturn getNormalizedFromYarn(tokens);\n\t}\n\n\tif (command === \"bun\") {\n\t\treturn getNormalizedFromBun(tokens);\n\t}\n\n\tif (command === \"bunx\") {\n\t\treturn getNormalizedFromBunx(tokens);\n\t}\n\n\treturn null;\n}\n\nfunction toCommandVariants(command: NormalizedCommand): CommandVariants {\n\tswitch (command.intent) {\n\t\tcase \"install\":\n\t\t\treturn {\n\t\t\t\tnpm: `npm install ${command.args}`,\n\t\t\t\tyarn: `yarn add ${command.args}`,\n\t\t\t\tpnpm: `pnpm add ${command.args}`,\n\t\t\t\tbun: `bun add ${command.args}`,\n\t\t\t};\n\t\tcase \"run\":\n\t\t\treturn {\n\t\t\t\tnpm: `npm run ${command.args}`,\n\t\t\t\tyarn: `yarn ${command.args}`,\n\t\t\t\tpnpm: `pnpm ${command.args}`,\n\t\t\t\tbun: `bun ${command.args}`,\n\t\t\t};\n\t\tcase \"create\":\n\t\t\treturn {\n\t\t\t\tnpm: `npm create ${command.args}`,\n\t\t\t\tyarn: `yarn create ${command.args}`,\n\t\t\t\tpnpm: `pnpm create ${command.args}`,\n\t\t\t\tbun: `bun create ${command.args}`,\n\t\t\t};\n\t\tcase \"npx-create\":\n\t\t\treturn {\n\t\t\t\tnpm: `npx create-${command.args}`,\n\t\t\t\tyarn: `yarn create ${command.args}`,\n\t\t\t\tpnpm: `pnpm create ${command.args}`,\n\t\t\t\tbun: `bunx --bun create-${command.args}`,\n\t\t\t};\n\t\tcase \"exec\":\n\t\t\treturn {\n\t\t\t\tnpm: `npx ${command.args}`,\n\t\t\t\tyarn: `yarn ${command.args}`,\n\t\t\t\tpnpm: `pnpm dlx ${command.args}`,\n\t\t\t\tbun: `bunx --bun ${command.args}`,\n\t\t\t};\n\t\tdefault: {\n\t\t\tconst exhaustiveCheck: never = command.intent;\n\t\t\tthrow new Error(`Unhandled command intent: ${String(exhaustiveCheck)}`);\n\t\t}\n\t}\n}\n\nexport function mapCommandVariants(input: string): CommandVariants | null {\n\tconst normalizedCommand = normalizeCommand(input);\n\tif (!normalizedCommand) {\n\t\treturn null;\n\t}\n\n\treturn toCommandVariants(normalizedCommand);\n}\n\nexport function mapStandaloneInlineCommandFromParagraphChildren(\n\tchildren: MarkdownToken[]\n): StandaloneInlineCommand | null {\n\tlet inlineCommand: string | null = null;\n\n\tfor (const child of children) {\n\t\tif (child.type === \"text\" && child.content.trim().length === 0) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (child.type === \"code\" && child.inline) {\n\t\t\tif (inlineCommand !== null) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tinlineCommand = child.content;\n\t\t\tcontinue;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tif (!inlineCommand) {\n\t\treturn null;\n\t}\n\n\tconst variants = mapCommandVariants(inlineCommand);\n\tif (!variants) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\tcommand: inlineCommand,\n\t\tvariants,\n\t};\n}\n\nexport function mapInlineCommandFromParagraphChildren(\n\tchildren: MarkdownToken[]\n): InlineParagraphCommand | null {\n\tlet inlineCommand: InlineParagraphCommand | null = null;\n\n\tfor (const [index, child] of children.entries()) {\n\t\tif (child.type !== \"code\" || !child.inline) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst variants = mapCommandVariants(child.content);\n\t\tif (!variants) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (inlineCommand) {\n\t\t\treturn null;\n\t\t}\n\n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AU,MAAM,QAAQ;AAC1C,OAAI,kBAAkB,KACrB,QAAO;AAGR,mBAAgB,MAAM;AACtB;;AAGD,SAAO;;AAGR,KAAI,CAAC,cACJ,QAAO;CAGR,MAAM,WAAW,mBAAmB,cAAc;AAClD,KAAI,CAAC,SACJ,QAAO;AAGR,QAAO;EACN,SAAS;EACT;EACA;;AAGF,SAAgB,sCACf,UACgC;CAChC,IAAIC,gBAA+C;AAEnD,MAAK,MAAM,CAAC,OAAO,UAAU,SAAS,SAAS,EAAE;AAChD,MAAI,MAAM,SAAS,UAAU,CAAC,MAAM,OACnC;EAGD,MAAM,WAAW,mBAAmB,MAAM,QAAQ;AAClD,MAAI,CAAC,SACJ;AAGD,MAAI,cACH,QAAO;AAGR,kBAAgB;GACf,SAAS,MAAM;GACf;GACA;GACA;;AAGF,QAAO"}
@@ -4,21 +4,25 @@ import { Avatar } from "./avatar/avatar.js";
4
4
  import { AvatarFallback } from "./avatar/fallback.js";
5
5
  import { AvatarImage } from "./avatar/image.js";
6
6
  import { Button } from "./button.js";
7
+ import { CommandPackageManager, CommandVariants, DEFAULT_PACKAGE_MANAGER, mapCommandVariants } from "./command-block-utils.js";
7
8
  import { ConversationTimeline, ConversationTimelineContainer, ConversationTimelineEmpty, ConversationTimelineLoading } from "./conversation-timeline.js";
8
9
  import { DaySeparator, DaySeparatorLabel, DaySeparatorLabelProps, DaySeparatorLine, DaySeparatorLineProps, DaySeparatorProps, DaySeparatorRenderProps, defaultFormatDate } from "./day-separator.js";
9
10
  import { FileInput, MultimodalInput, SupportInput } from "./multimodal-input.js";
10
11
  import { PageDefinition, Router, RouterProps } from "./router.js";
11
- import { TimelineItem, TimelineItemContent, TimelineItemTimestamp } from "./timeline-item.js";
12
+ import { TimelineCodeBlock, TimelineCodeBlockProps } from "./timeline-code-block.js";
13
+ import { TimelineCommandBlock, TimelineCommandBlockProps } from "./timeline-command-block.js";
14
+ import { TimelineItem, TimelineItemContent, TimelineItemContentMarkdownRenderers, TimelineItemTimestamp } from "./timeline-item.js";
12
15
  import { TimelineItemAttachments, TimelineItemFiles, TimelineItemImages, extractFileParts, extractImageParts, hasAttachments } from "./timeline-item-attachments.js";
13
16
  import { TimelineItemGroup, TimelineItemGroupAvatar, TimelineItemGroupContent, TimelineItemGroupHeader, TimelineItemGroupReadIndicator, TimelineItemGroupSeenIndicator } from "./timeline-item-group.js";
17
+ import { hasExpandedTimelineContent } from "./timeline-message-layout.js";
14
18
  import { SupportTrigger, TriggerProps, TriggerRenderProps } from "./trigger.js";
15
19
  import { SupportWindow } from "./window.js";
16
20
  import "./index.parts.js";
17
21
 
18
22
  //#region src/primitives/index.d.ts
19
23
  declare namespace index_d_exports {
20
- export { Avatar, AvatarFallback, AvatarImage, Button, SupportConfig as Config, ConversationTimeline, ConversationTimelineContainer, ConversationTimelineEmpty, ConversationTimelineLoading, DaySeparator, DaySeparatorLabel, DaySeparatorLabelProps, DaySeparatorLine, DaySeparatorLineProps, DaySeparatorProps, DaySeparatorRenderProps, FileInput, SupportInput as Input, MultimodalInput, PageDefinition, Router, RouterProps, TimelineItem, TimelineItemAttachments, TimelineItemContent, TimelineItemFiles, TimelineItemGroup, TimelineItemGroupAvatar, TimelineItemGroupContent, TimelineItemGroupHeader, TimelineItemGroupReadIndicator, TimelineItemGroupSeenIndicator, TimelineItemImages, TimelineItemTimestamp, SupportTrigger as Trigger, TriggerProps, TriggerRenderProps, TypingIndicator, TypingIndicatorProps, TypingParticipant, TypingParticipantType, SupportWindow as Window, defaultFormatDate, extractFileParts, extractImageParts, hasAttachments };
24
+ export { Avatar, AvatarFallback, AvatarImage, Button, CommandPackageManager, CommandVariants, SupportConfig as Config, ConversationTimeline, ConversationTimelineContainer, ConversationTimelineEmpty, ConversationTimelineLoading, DEFAULT_PACKAGE_MANAGER, DaySeparator, DaySeparatorLabel, DaySeparatorLabelProps, DaySeparatorLine, DaySeparatorLineProps, DaySeparatorProps, DaySeparatorRenderProps, FileInput, SupportInput as Input, MultimodalInput, PageDefinition, Router, RouterProps, TimelineCodeBlock, TimelineCodeBlockProps, TimelineCommandBlock, TimelineCommandBlockProps, TimelineItem, TimelineItemAttachments, TimelineItemContent, TimelineItemContentMarkdownRenderers, TimelineItemFiles, TimelineItemGroup, TimelineItemGroupAvatar, TimelineItemGroupContent, TimelineItemGroupHeader, TimelineItemGroupReadIndicator, TimelineItemGroupSeenIndicator, TimelineItemImages, TimelineItemTimestamp, SupportTrigger as Trigger, TriggerProps, TriggerRenderProps, TypingIndicator, TypingIndicatorProps, TypingParticipant, TypingParticipantType, SupportWindow as Window, defaultFormatDate, extractFileParts, extractImageParts, hasAttachments, hasExpandedTimelineContent, mapCommandVariants };
21
25
  }
22
26
  //#endregion
23
- export { Avatar, AvatarFallback, AvatarImage, Button, SupportConfig as Config, ConversationTimeline, ConversationTimelineContainer, ConversationTimelineEmpty, ConversationTimelineLoading, DaySeparator, DaySeparatorLabel, DaySeparatorLabelProps, DaySeparatorLine, DaySeparatorLineProps, DaySeparatorProps, DaySeparatorRenderProps, FileInput, SupportInput as Input, MultimodalInput, PageDefinition, Router, RouterProps, TimelineItem, TimelineItemAttachments, TimelineItemContent, TimelineItemFiles, TimelineItemGroup, TimelineItemGroupAvatar, TimelineItemGroupContent, TimelineItemGroupHeader, TimelineItemGroupReadIndicator, TimelineItemGroupSeenIndicator, TimelineItemImages, TimelineItemTimestamp, SupportTrigger as Trigger, TriggerProps, TriggerRenderProps, TypingIndicator, TypingIndicatorProps, TypingParticipant, TypingParticipantType, SupportWindow as Window, defaultFormatDate, extractFileParts, extractImageParts, hasAttachments, index_d_exports };
27
+ export { Avatar, AvatarFallback, AvatarImage, Button, CommandPackageManager, CommandVariants, SupportConfig as Config, ConversationTimeline, ConversationTimelineContainer, ConversationTimelineEmpty, ConversationTimelineLoading, DEFAULT_PACKAGE_MANAGER, DaySeparator, DaySeparatorLabel, DaySeparatorLabelProps, DaySeparatorLine, DaySeparatorLineProps, DaySeparatorProps, DaySeparatorRenderProps, FileInput, SupportInput as Input, MultimodalInput, PageDefinition, Router, RouterProps, TimelineCodeBlock, TimelineCodeBlockProps, TimelineCommandBlock, TimelineCommandBlockProps, TimelineItem, TimelineItemAttachments, TimelineItemContent, TimelineItemContentMarkdownRenderers, TimelineItemFiles, TimelineItemGroup, TimelineItemGroupAvatar, TimelineItemGroupContent, TimelineItemGroupHeader, TimelineItemGroupReadIndicator, TimelineItemGroupSeenIndicator, TimelineItemImages, TimelineItemTimestamp, SupportTrigger as Trigger, TriggerProps, TriggerRenderProps, TypingIndicator, TypingIndicatorProps, TypingParticipant, TypingParticipantType, SupportWindow as Window, defaultFormatDate, extractFileParts, extractImageParts, hasAttachments, hasExpandedTimelineContent, index_d_exports, mapCommandVariants };
24
28
  //# sourceMappingURL=index.d.ts.map
@@ -5,13 +5,17 @@ import { AvatarImage } from "./avatar/image.js";
5
5
  import { TypingIndicator } from "../support/components/typing-indicator.js";
6
6
  import { SupportConfig } from "../support-config.js";
7
7
  import { Button } from "./button.js";
8
+ import { DEFAULT_PACKAGE_MANAGER, mapCommandVariants } from "./command-block-utils.js";
8
9
  import { ConversationTimeline, ConversationTimelineContainer, ConversationTimelineEmpty, ConversationTimelineLoading } from "./conversation-timeline.js";
9
10
  import { DaySeparator, DaySeparatorLabel, DaySeparatorLine, defaultFormatDate } from "./day-separator.js";
10
11
  import { FileInput, MultimodalInput, SupportInput } from "./multimodal-input.js";
11
12
  import { Router } from "./router.js";
13
+ import { TimelineCodeBlock } from "./timeline-code-block.js";
14
+ import { TimelineCommandBlock } from "./timeline-command-block.js";
12
15
  import { TimelineItem, TimelineItemContent, TimelineItemTimestamp } from "./timeline-item.js";
13
16
  import { TimelineItemAttachments, TimelineItemFiles, TimelineItemImages, extractFileParts, extractImageParts, hasAttachments } from "./timeline-item-attachments.js";
14
17
  import { TimelineItemGroup, TimelineItemGroupAvatar, TimelineItemGroupContent, TimelineItemGroupHeader, TimelineItemGroupReadIndicator, TimelineItemGroupSeenIndicator } from "./timeline-item-group.js";
18
+ import { hasExpandedTimelineContent } from "./timeline-message-layout.js";
15
19
  import { SupportTrigger } from "./trigger.js";
16
20
  import { SupportWindow } from "./window.js";
17
21
 
@@ -26,6 +30,7 @@ var primitives_exports = /* @__PURE__ */ __export({
26
30
  ConversationTimelineContainer: () => ConversationTimelineContainer,
27
31
  ConversationTimelineEmpty: () => ConversationTimelineEmpty,
28
32
  ConversationTimelineLoading: () => ConversationTimelineLoading,
33
+ DEFAULT_PACKAGE_MANAGER: () => DEFAULT_PACKAGE_MANAGER,
29
34
  DaySeparator: () => DaySeparator,
30
35
  DaySeparatorLabel: () => DaySeparatorLabel,
31
36
  DaySeparatorLine: () => DaySeparatorLine,
@@ -33,6 +38,8 @@ var primitives_exports = /* @__PURE__ */ __export({
33
38
  Input: () => SupportInput,
34
39
  MultimodalInput: () => MultimodalInput,
35
40
  Router: () => Router,
41
+ TimelineCodeBlock: () => TimelineCodeBlock,
42
+ TimelineCommandBlock: () => TimelineCommandBlock,
36
43
  TimelineItem: () => TimelineItem,
37
44
  TimelineItemAttachments: () => TimelineItemAttachments,
38
45
  TimelineItemContent: () => TimelineItemContent,
@@ -51,9 +58,11 @@ var primitives_exports = /* @__PURE__ */ __export({
51
58
  defaultFormatDate: () => defaultFormatDate,
52
59
  extractFileParts: () => extractFileParts,
53
60
  extractImageParts: () => extractImageParts,
54
- hasAttachments: () => hasAttachments
61
+ hasAttachments: () => hasAttachments,
62
+ hasExpandedTimelineContent: () => hasExpandedTimelineContent,
63
+ mapCommandVariants: () => mapCommandVariants
55
64
  });
56
65
 
57
66
  //#endregion
58
- export { Avatar, AvatarFallback, AvatarImage, Button, SupportConfig as Config, ConversationTimeline, ConversationTimelineContainer, ConversationTimelineEmpty, ConversationTimelineLoading, DaySeparator, DaySeparatorLabel, DaySeparatorLine, FileInput, SupportInput as Input, MultimodalInput, Router, TimelineItem, TimelineItemAttachments, TimelineItemContent, TimelineItemFiles, TimelineItemGroup, TimelineItemGroupAvatar, TimelineItemGroupContent, TimelineItemGroupHeader, TimelineItemGroupReadIndicator, TimelineItemGroupSeenIndicator, TimelineItemImages, TimelineItemTimestamp, SupportTrigger as Trigger, TypingIndicator, SupportWindow as Window, defaultFormatDate, extractFileParts, extractImageParts, hasAttachments, primitives_exports };
67
+ export { Avatar, AvatarFallback, AvatarImage, Button, SupportConfig as Config, ConversationTimeline, ConversationTimelineContainer, ConversationTimelineEmpty, ConversationTimelineLoading, DEFAULT_PACKAGE_MANAGER, DaySeparator, DaySeparatorLabel, DaySeparatorLine, FileInput, SupportInput as Input, MultimodalInput, Router, TimelineCodeBlock, TimelineCommandBlock, TimelineItem, TimelineItemAttachments, TimelineItemContent, TimelineItemFiles, TimelineItemGroup, TimelineItemGroupAvatar, TimelineItemGroupContent, TimelineItemGroupHeader, TimelineItemGroupReadIndicator, TimelineItemGroupSeenIndicator, TimelineItemImages, TimelineItemTimestamp, SupportTrigger as Trigger, TypingIndicator, SupportWindow as Window, defaultFormatDate, extractFileParts, extractImageParts, hasAttachments, hasExpandedTimelineContent, mapCommandVariants, primitives_exports };
59
68
  //# sourceMappingURL=index.js.map
@@ -5,13 +5,17 @@ import { AvatarFallback } from "./avatar/fallback.js";
5
5
  import { AvatarImage } from "./avatar/image.js";
6
6
  import "./avatar/index.js";
7
7
  import { Button } from "./button.js";
8
+ import { CommandPackageManager, CommandVariants, DEFAULT_PACKAGE_MANAGER, mapCommandVariants } from "./command-block-utils.js";
8
9
  import { ConversationTimeline, ConversationTimelineContainer, ConversationTimelineEmpty, ConversationTimelineLoading } from "./conversation-timeline.js";
9
10
  import { DaySeparator, DaySeparatorLabel, DaySeparatorLabelProps, DaySeparatorLine, DaySeparatorLineProps, DaySeparatorProps, DaySeparatorRenderProps, defaultFormatDate } from "./day-separator.js";
10
11
  import { FileInput, MultimodalInput, SupportInput } from "./multimodal-input.js";
11
12
  import { PageDefinition, Router, RouterProps } from "./router.js";
12
- import { TimelineItem, TimelineItemContent, TimelineItemTimestamp } from "./timeline-item.js";
13
+ import { TimelineCodeBlock, TimelineCodeBlockProps } from "./timeline-code-block.js";
14
+ import { TimelineCommandBlock, TimelineCommandBlockProps } from "./timeline-command-block.js";
15
+ import { TimelineItem, TimelineItemContent, TimelineItemContentMarkdownRenderers, TimelineItemTimestamp } from "./timeline-item.js";
13
16
  import { TimelineItemAttachments, TimelineItemFiles, TimelineItemImages, extractFileParts, extractImageParts, hasAttachments } from "./timeline-item-attachments.js";
14
17
  import { TimelineItemGroup, TimelineItemGroupAvatar, TimelineItemGroupContent, TimelineItemGroupHeader, TimelineItemGroupReadIndicator, TimelineItemGroupSeenIndicator } from "./timeline-item-group.js";
18
+ import { hasExpandedTimelineContent } from "./timeline-message-layout.js";
15
19
  import { SupportTrigger, TriggerProps, TriggerRenderProps } from "./trigger.js";
16
20
  import { SupportWindow } from "./window.js";
17
- export { Avatar, AvatarFallback, AvatarImage, Button, SupportConfig as Config, ConversationTimeline, ConversationTimelineContainer, ConversationTimelineEmpty, ConversationTimelineLoading, DaySeparator, DaySeparatorLabel, type DaySeparatorLabelProps, DaySeparatorLine, type DaySeparatorLineProps, type DaySeparatorProps, type DaySeparatorRenderProps, FileInput, SupportInput as Input, MultimodalInput, type PageDefinition, Router, type RouterProps, TimelineItem, TimelineItemAttachments, TimelineItemContent, TimelineItemFiles, TimelineItemGroup, TimelineItemGroupAvatar, TimelineItemGroupContent, TimelineItemGroupHeader, TimelineItemGroupReadIndicator, TimelineItemGroupSeenIndicator, TimelineItemImages, TimelineItemTimestamp, SupportTrigger as Trigger, type TriggerProps, type TriggerRenderProps, TypingIndicator, type TypingIndicatorProps, type TypingParticipant, type TypingParticipantType, SupportWindow as Window, defaultFormatDate, extractFileParts, extractImageParts, hasAttachments };
21
+ export { Avatar, AvatarFallback, AvatarImage, Button, type CommandPackageManager, type CommandVariants, SupportConfig as Config, ConversationTimeline, ConversationTimelineContainer, ConversationTimelineEmpty, ConversationTimelineLoading, DEFAULT_PACKAGE_MANAGER, DaySeparator, DaySeparatorLabel, type DaySeparatorLabelProps, DaySeparatorLine, type DaySeparatorLineProps, type DaySeparatorProps, type DaySeparatorRenderProps, FileInput, SupportInput as Input, MultimodalInput, type PageDefinition, Router, type RouterProps, TimelineCodeBlock, type TimelineCodeBlockProps, TimelineCommandBlock, type TimelineCommandBlockProps, TimelineItem, TimelineItemAttachments, TimelineItemContent, type TimelineItemContentMarkdownRenderers, TimelineItemFiles, TimelineItemGroup, TimelineItemGroupAvatar, TimelineItemGroupContent, TimelineItemGroupHeader, TimelineItemGroupReadIndicator, TimelineItemGroupSeenIndicator, TimelineItemImages, TimelineItemTimestamp, SupportTrigger as Trigger, type TriggerProps, type TriggerRenderProps, TypingIndicator, type TypingIndicatorProps, type TypingParticipant, type TypingParticipantType, SupportWindow as Window, defaultFormatDate, extractFileParts, extractImageParts, hasAttachments, hasExpandedTimelineContent, mapCommandVariants };
@@ -4,14 +4,18 @@ import { AvatarImage } from "./avatar/image.js";
4
4
  import { TypingIndicator } from "../support/components/typing-indicator.js";
5
5
  import { SupportConfig } from "../support-config.js";
6
6
  import { Button } from "./button.js";
7
+ import { DEFAULT_PACKAGE_MANAGER, mapCommandVariants } from "./command-block-utils.js";
7
8
  import { ConversationTimeline, ConversationTimelineContainer, ConversationTimelineEmpty, ConversationTimelineLoading } from "./conversation-timeline.js";
8
9
  import { DaySeparator, DaySeparatorLabel, DaySeparatorLine, defaultFormatDate } from "./day-separator.js";
9
10
  import { FileInput, MultimodalInput, SupportInput } from "./multimodal-input.js";
10
11
  import { Router } from "./router.js";
12
+ import { TimelineCodeBlock } from "./timeline-code-block.js";
13
+ import { TimelineCommandBlock } from "./timeline-command-block.js";
11
14
  import { TimelineItem, TimelineItemContent, TimelineItemTimestamp } from "./timeline-item.js";
12
15
  import { TimelineItemAttachments, TimelineItemFiles, TimelineItemImages, extractFileParts, extractImageParts, hasAttachments } from "./timeline-item-attachments.js";
13
16
  import { TimelineItemGroup, TimelineItemGroupAvatar, TimelineItemGroupContent, TimelineItemGroupHeader, TimelineItemGroupReadIndicator, TimelineItemGroupSeenIndicator } from "./timeline-item-group.js";
17
+ import { hasExpandedTimelineContent } from "./timeline-message-layout.js";
14
18
  import { SupportTrigger } from "./trigger.js";
15
19
  import { SupportWindow } from "./window.js";
16
20
 
17
- export { Avatar, AvatarFallback, AvatarImage, Button, SupportConfig as Config, ConversationTimeline, ConversationTimelineContainer, ConversationTimelineEmpty, ConversationTimelineLoading, DaySeparator, DaySeparatorLabel, DaySeparatorLine, FileInput, SupportInput as Input, MultimodalInput, Router, TimelineItem, TimelineItemAttachments, TimelineItemContent, TimelineItemFiles, TimelineItemGroup, TimelineItemGroupAvatar, TimelineItemGroupContent, TimelineItemGroupHeader, TimelineItemGroupReadIndicator, TimelineItemGroupSeenIndicator, TimelineItemImages, TimelineItemTimestamp, SupportTrigger as Trigger, TypingIndicator, SupportWindow as Window, defaultFormatDate, extractFileParts, extractImageParts, hasAttachments };
21
+ export { Avatar, AvatarFallback, AvatarImage, Button, SupportConfig as Config, ConversationTimeline, ConversationTimelineContainer, ConversationTimelineEmpty, ConversationTimelineLoading, DEFAULT_PACKAGE_MANAGER, DaySeparator, DaySeparatorLabel, DaySeparatorLine, FileInput, SupportInput as Input, MultimodalInput, Router, TimelineCodeBlock, TimelineCommandBlock, TimelineItem, TimelineItemAttachments, TimelineItemContent, TimelineItemFiles, TimelineItemGroup, TimelineItemGroupAvatar, TimelineItemGroupContent, TimelineItemGroupHeader, TimelineItemGroupReadIndicator, TimelineItemGroupSeenIndicator, TimelineItemImages, TimelineItemTimestamp, SupportTrigger as Trigger, TypingIndicator, SupportWindow as Window, defaultFormatDate, extractFileParts, extractImageParts, hasAttachments, hasExpandedTimelineContent, mapCommandVariants };