@slipstream-ui/ai 0.4.0 → 0.6.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 (51) hide show
  1. package/dist/index.d.mts +51 -4
  2. package/dist/index.d.ts +51 -4
  3. package/dist/index.js +244 -113
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +246 -115
  6. package/dist/index.mjs.map +1 -1
  7. package/dist/manifests/attachment.manifest.json +37 -8
  8. package/dist/manifests/branch.manifest.json +3 -1
  9. package/dist/manifests/chain-thought.manifest.json +1 -1
  10. package/dist/manifests/code-block.manifest.json +3 -1
  11. package/dist/manifests/command-palette.manifest.json +59 -4
  12. package/dist/manifests/confirmation.manifest.json +3 -1
  13. package/dist/manifests/conversation.manifest.json +1 -1
  14. package/dist/manifests/inline-citation.manifest.json +3 -1
  15. package/dist/manifests/message-actions.manifest.json +61 -10
  16. package/dist/manifests/message.manifest.json +13 -1
  17. package/dist/manifests/prompt-input.manifest.json +2 -2
  18. package/dist/manifests/reasoning.manifest.json +19 -1
  19. package/dist/manifests/response.manifest.json +3 -1
  20. package/dist/manifests/source.manifest.json +2 -2
  21. package/dist/manifests/streaming-indicator.manifest.json +1 -1
  22. package/dist/manifests/suggestions.manifest.json +2 -2
  23. package/dist/manifests/tool-call.manifest.json +7 -1
  24. package/package.json +10 -10
  25. package/src/components/code-block/CodeBlock.tsx +91 -5
  26. package/src/components/command-palette/CommandPalette.test.tsx +42 -0
  27. package/src/components/command-palette/CommandPalette.tsx +82 -8
  28. package/src/components/confirmation/Confirmation.tsx +1 -1
  29. package/src/components/conversation/Conversation.tsx +6 -1
  30. package/src/components/message/Message.test.tsx +15 -0
  31. package/src/components/message/Message.tsx +9 -1
  32. package/src/components/reasoning/Reasoning.test.tsx +15 -0
  33. package/src/components/reasoning/Reasoning.tsx +20 -7
  34. package/src/components/tool-call/ToolCall.tsx +24 -8
  35. package/src/manifests/attachment.manifest.json +37 -8
  36. package/src/manifests/branch.manifest.json +3 -1
  37. package/src/manifests/chain-thought.manifest.json +1 -1
  38. package/src/manifests/code-block.manifest.json +3 -1
  39. package/src/manifests/command-palette.manifest.json +59 -4
  40. package/src/manifests/confirmation.manifest.json +3 -1
  41. package/src/manifests/conversation.manifest.json +1 -1
  42. package/src/manifests/inline-citation.manifest.json +3 -1
  43. package/src/manifests/message-actions.manifest.json +61 -10
  44. package/src/manifests/message.manifest.json +13 -1
  45. package/src/manifests/prompt-input.manifest.json +2 -2
  46. package/src/manifests/reasoning.manifest.json +19 -1
  47. package/src/manifests/response.manifest.json +3 -1
  48. package/src/manifests/source.manifest.json +2 -2
  49. package/src/manifests/streaming-indicator.manifest.json +1 -1
  50. package/src/manifests/suggestions.manifest.json +2 -2
  51. package/src/manifests/tool-call.manifest.json +7 -1
@@ -5,11 +5,48 @@
5
5
  "description": "Feedback toolbar for an AI response: copy to clipboard, thumbs up/down rating, and regenerate. Every action is a callback; the component holds no conversation state.",
6
6
  "designIntent": "Collect user trust signals (copy, rating, regeneration) with minimal API surface; consumers own what happens after each action.",
7
7
  "props": [
8
- { "name": "content", "type": "string", "required": false, "description": "Text to copy; omit to hide the copy action." },
9
- { "name": "onCopy", "type": "(content: string) => void", "required": false, "description": "Called after copy with the copied text." },
10
- { "name": "onFeedback", "type": "(rating: 'up' | 'down' | undefined) => void", "required": false, "description": "Rating callback; selecting the active rating again passes undefined." },
11
- { "name": "onRegenerate", "type": "() => void", "required": false, "description": "Regeneration request; omit to hide the action." },
12
- { "name": "labels", "type": "{ copy?, copied?, thumbUp?, thumbDown?, regenerate? }", "required": false, "description": "Overrides for all visible labels; enables localization." }
8
+ {
9
+ "name": "content",
10
+ "type": "string",
11
+ "required": false,
12
+ "description": "Text to copy; omit to hide the copy action."
13
+ },
14
+ {
15
+ "name": "onCopy",
16
+ "type": "(content: string) => void",
17
+ "required": false,
18
+ "description": "Called after copy with the copied text."
19
+ },
20
+ {
21
+ "name": "onFeedback",
22
+ "type": "(rating: 'up' | 'down' | undefined) => void",
23
+ "required": false,
24
+ "description": "Rating callback; selecting the active rating again passes undefined."
25
+ },
26
+ {
27
+ "name": "onRegenerate",
28
+ "type": "() => void",
29
+ "required": false,
30
+ "description": "Regeneration request; omit to hide the action."
31
+ },
32
+ {
33
+ "name": "autohide",
34
+ "type": "'always' | 'on-hover' | 'not-last'",
35
+ "required": false,
36
+ "defaultValue": "always",
37
+ "enum": [
38
+ "always",
39
+ "on-hover",
40
+ "not-last"
41
+ ],
42
+ "description": "Controls visibility: always visible, visible on hover/focus, or hidden until hover for non-latest messages."
43
+ },
44
+ {
45
+ "name": "labels",
46
+ "type": "{ copy?, copied?, thumbUp?, thumbDown?, regenerate? }",
47
+ "required": false,
48
+ "description": "Overrides for all visible labels; enables localization."
49
+ }
13
50
  ],
14
51
  "examples": [
15
52
  {
@@ -22,14 +59,28 @@
22
59
  }
23
60
  ],
24
61
  "antiPatterns": [
25
- { "title": "Do not place MessageActions inside the message text flow", "explanation": "Render it below the Message bubble so actions remain visually and semantically separate from content." }
62
+ {
63
+ "title": "Do not place MessageActions inside the message text flow",
64
+ "explanation": "Render it below the Message bubble so actions remain visually and semantically separate from content."
65
+ }
26
66
  ],
27
67
  "accessibility": [
28
- { "feature": "Toolbar semantics", "implementation": "Root has role=toolbar with an aria-label." },
29
- { "feature": "Toggle state", "implementation": "Rating buttons expose aria-pressed so screen readers announce selection." },
30
- { "feature": "Icon buttons", "implementation": "All icon-only controls have accessible labels; labels are localizable." }
68
+ {
69
+ "feature": "Toolbar semantics",
70
+ "implementation": "Root has role=toolbar with an aria-label."
71
+ },
72
+ {
73
+ "feature": "Toggle state",
74
+ "implementation": "Rating buttons expose aria-pressed so screen readers announce selection."
75
+ },
76
+ {
77
+ "feature": "Icon buttons",
78
+ "implementation": "All icon-only controls have accessible labels; labels are localizable."
79
+ }
31
80
  ],
81
+ "sourceDir": "message-actions",
82
+ "exportName": "MessageActions",
32
83
  "package": "@slipstream-ui/ai",
33
84
  "importPath": "@slipstream-ui/ai",
34
- "version": "0.0.1"
85
+ "version": "0.6.0"
35
86
  }
@@ -102,6 +102,18 @@
102
102
  "type": "(content: string) => void",
103
103
  "required": false,
104
104
  "description": "Enables edit-and-resubmit; called with the edited content"
105
+ },
106
+ {
107
+ "name": "formatTime",
108
+ "type": "(date: Date) => string",
109
+ "required": false,
110
+ "description": "Formats message or step timestamps. Defaults to the runtime toLocaleTimeString()."
111
+ },
112
+ {
113
+ "name": "locale",
114
+ "type": "string",
115
+ "required": false,
116
+ "description": "BCP-47 locale used by the default timestamp formatter."
105
117
  }
106
118
  ],
107
119
  "examples": [
@@ -229,7 +241,7 @@
229
241
  ],
230
242
  "package": "@slipstream-ui/ai",
231
243
  "importPath": "@slipstream-ui/ai",
232
- "version": "0.0.1",
244
+ "version": "0.6.0",
233
245
  "sourceDir": "message",
234
246
  "exportName": "Message"
235
247
  }
@@ -328,7 +328,7 @@
328
328
  ],
329
329
  "package": "@slipstream-ui/ai",
330
330
  "importPath": "@slipstream-ui/ai",
331
- "version": "0.0.1",
331
+ "version": "0.6.0",
332
332
  "sourceDir": "prompt-input",
333
333
  "exportName": "PromptInput"
334
- }
334
+ }
@@ -53,6 +53,24 @@
53
53
  "type": "boolean",
54
54
  "required": false,
55
55
  "description": "Shows a streaming indicator while reasoning is in progress"
56
+ },
57
+ {
58
+ "name": "labels",
59
+ "type": "{ title?: string; count?: (count: number) => string; thinking?: string; step?: (index: number) => string }",
60
+ "required": false,
61
+ "description": "Localized header, count and step labels."
62
+ },
63
+ {
64
+ "name": "formatTime",
65
+ "type": "(date: Date) => string",
66
+ "required": false,
67
+ "description": "Formats message or step timestamps. Defaults to the runtime toLocaleTimeString()."
68
+ },
69
+ {
70
+ "name": "locale",
71
+ "type": "string",
72
+ "required": false,
73
+ "description": "BCP-47 locale used by the default timestamp formatter."
56
74
  }
57
75
  ],
58
76
  "examples": [
@@ -171,7 +189,7 @@
171
189
  ],
172
190
  "package": "@slipstream-ui/ai",
173
191
  "importPath": "@slipstream-ui/ai",
174
- "version": "0.0.1",
192
+ "version": "0.6.0",
175
193
  "sourceDir": "reasoning",
176
194
  "exportName": "Reasoning"
177
195
  }
@@ -45,7 +45,9 @@
45
45
  "implementation": "Routed through CodeBlock with accessible copy button."
46
46
  }
47
47
  ],
48
+ "sourceDir": "response",
49
+ "exportName": "Response",
48
50
  "package": "@slipstream-ui/ai",
49
51
  "importPath": "@slipstream-ui/ai",
50
- "version": "0.0.1"
52
+ "version": "0.6.0"
51
53
  }
@@ -72,7 +72,7 @@
72
72
  ],
73
73
  "package": "@slipstream-ui/ai",
74
74
  "importPath": "@slipstream-ui/ai",
75
- "version": "0.0.1",
75
+ "version": "0.6.0",
76
76
  "sourceDir": "source",
77
77
  "exportName": "Source"
78
- }
78
+ }
@@ -33,7 +33,7 @@
33
33
  ],
34
34
  "package": "@slipstream-ui/ai",
35
35
  "importPath": "@slipstream-ui/ai",
36
- "version": "0.0.1",
36
+ "version": "0.6.0",
37
37
  "sourceDir": "streaming",
38
38
  "exportName": "StreamingIndicator"
39
39
  }
@@ -39,7 +39,7 @@
39
39
  ],
40
40
  "package": "@slipstream-ui/ai",
41
41
  "importPath": "@slipstream-ui/ai",
42
- "version": "0.0.1",
42
+ "version": "0.6.0",
43
43
  "sourceDir": "suggestion",
44
44
  "exportName": "Suggestions"
45
- }
45
+ }
@@ -30,6 +30,12 @@
30
30
  "type": "string",
31
31
  "required": false,
32
32
  "description": "Additional CSS classes to apply"
33
+ },
34
+ {
35
+ "name": "labels",
36
+ "type": "{ pending?: string; running?: string; completed?: string; failed?: string; arguments?: string; result?: string; error?: string }",
37
+ "required": false,
38
+ "description": "Localized status and section labels."
33
39
  }
34
40
  ],
35
41
  "examples": [
@@ -152,7 +158,7 @@
152
158
  ],
153
159
  "package": "@slipstream-ui/ai",
154
160
  "importPath": "@slipstream-ui/ai",
155
- "version": "0.0.1",
161
+ "version": "0.6.0",
156
162
  "sourceDir": "tool-call",
157
163
  "exportName": "ToolCall"
158
164
  }