@slipstream-ui/ai 0.3.0 → 0.5.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.
- package/dist/index.d.mts +33 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +236 -110
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +238 -112
- package/dist/index.mjs.map +1 -1
- package/dist/manifests/attachment.manifest.json +2 -0
- package/dist/manifests/branch.manifest.json +2 -0
- package/dist/manifests/code-block.manifest.json +2 -0
- package/dist/manifests/command-palette.manifest.json +37 -3
- package/dist/manifests/confirmation.manifest.json +2 -0
- package/dist/manifests/inline-citation.manifest.json +2 -0
- package/dist/manifests/message-actions.manifest.json +3 -0
- package/dist/manifests/reasoning.manifest.json +6 -0
- package/dist/manifests/response.manifest.json +2 -0
- package/dist/manifests/tool-call.manifest.json +6 -0
- package/package.json +3 -3
- package/src/components/code-block/CodeBlock.tsx +91 -5
- package/src/components/command-palette/CommandPalette.test.tsx +21 -0
- package/src/components/command-palette/CommandPalette.tsx +71 -6
- package/src/components/confirmation/Confirmation.tsx +1 -1
- package/src/components/conversation/Conversation.tsx +6 -1
- package/src/components/reasoning/Reasoning.tsx +13 -6
- package/src/components/tool-call/ToolCall.tsx +24 -8
- package/src/manifests/attachment.manifest.json +2 -0
- package/src/manifests/branch.manifest.json +2 -0
- package/src/manifests/code-block.manifest.json +2 -0
- package/src/manifests/command-palette.manifest.json +37 -3
- package/src/manifests/confirmation.manifest.json +2 -0
- package/src/manifests/inline-citation.manifest.json +2 -0
- package/src/manifests/message-actions.manifest.json +3 -0
- package/src/manifests/reasoning.manifest.json +6 -0
- package/src/manifests/response.manifest.json +2 -0
- package/src/manifests/tool-call.manifest.json +6 -0
|
@@ -22,7 +22,13 @@
|
|
|
22
22
|
"type": "Command[]",
|
|
23
23
|
"required": true,
|
|
24
24
|
"description": "Available commands: { id, label, section?, keywords?, shortcut? }",
|
|
25
|
-
"examples": [
|
|
25
|
+
"examples": [
|
|
26
|
+
{
|
|
27
|
+
"id": "go-docs",
|
|
28
|
+
"label": "Open documentation",
|
|
29
|
+
"section": "Navigation"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
26
32
|
},
|
|
27
33
|
{
|
|
28
34
|
"name": "onSelect",
|
|
@@ -33,9 +39,34 @@
|
|
|
33
39
|
{
|
|
34
40
|
"name": "placeholder",
|
|
35
41
|
"type": "string",
|
|
36
|
-
"defaultValue": "Type a command
|
|
42
|
+
"defaultValue": "Type a command.",
|
|
37
43
|
"required": false,
|
|
38
44
|
"description": "Input placeholder text"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "loadCommands",
|
|
48
|
+
"type": "(query: string) => Promise<Command[]>",
|
|
49
|
+
"required": false,
|
|
50
|
+
"description": "Async command source; debounced and stale-response guarded."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "debounceMs",
|
|
54
|
+
"type": "number",
|
|
55
|
+
"required": false,
|
|
56
|
+
"defaultValue": "200",
|
|
57
|
+
"description": "Debounce for loadCommands in ms."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "renderCommand",
|
|
61
|
+
"type": "(command, state: { active: boolean }) => ReactNode",
|
|
62
|
+
"required": false,
|
|
63
|
+
"description": "Custom row renderer (icons, type badges)."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "loadingText",
|
|
67
|
+
"type": "string",
|
|
68
|
+
"required": false,
|
|
69
|
+
"description": "Shown while async commands load."
|
|
39
70
|
}
|
|
40
71
|
],
|
|
41
72
|
"examples": [
|
|
@@ -71,7 +102,10 @@
|
|
|
71
102
|
"relationship": "CommandPalette switches modes/actions; PromptInput captures free-form chat text."
|
|
72
103
|
}
|
|
73
104
|
],
|
|
74
|
-
"relatedComponents": [
|
|
105
|
+
"relatedComponents": [
|
|
106
|
+
"PromptInput",
|
|
107
|
+
"Dialog"
|
|
108
|
+
],
|
|
75
109
|
"package": "@slipstream-ui/ai",
|
|
76
110
|
"importPath": "@slipstream-ui/ai",
|
|
77
111
|
"version": "0.0.1",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
{ "name": "onCopy", "type": "(content: string) => void", "required": false, "description": "Called after copy with the copied text." },
|
|
10
10
|
{ "name": "onFeedback", "type": "(rating: 'up' | 'down' | undefined) => void", "required": false, "description": "Rating callback; selecting the active rating again passes undefined." },
|
|
11
11
|
{ "name": "onRegenerate", "type": "() => void", "required": false, "description": "Regeneration request; omit to hide the action." },
|
|
12
|
+
{ "name": "autohide", "type": "'always' | 'on-hover' | 'not-last'", "required": false, "defaultValue": "always", "enum": ["always", "on-hover", "not-last"], "description": "Controls visibility: always visible, visible on hover/focus, or hidden until hover for non-latest messages." },
|
|
12
13
|
{ "name": "labels", "type": "{ copy?, copied?, thumbUp?, thumbDown?, regenerate? }", "required": false, "description": "Overrides for all visible labels; enables localization." }
|
|
13
14
|
],
|
|
14
15
|
"examples": [
|
|
@@ -29,6 +30,8 @@
|
|
|
29
30
|
{ "feature": "Toggle state", "implementation": "Rating buttons expose aria-pressed so screen readers announce selection." },
|
|
30
31
|
{ "feature": "Icon buttons", "implementation": "All icon-only controls have accessible labels; labels are localizable." }
|
|
31
32
|
],
|
|
33
|
+
"sourceDir": "message-actions",
|
|
34
|
+
"exportName": "MessageActions",
|
|
32
35
|
"package": "@slipstream-ui/ai",
|
|
33
36
|
"importPath": "@slipstream-ui/ai",
|
|
34
37
|
"version": "0.0.1"
|
|
@@ -53,6 +53,12 @@
|
|
|
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."
|
|
56
62
|
}
|
|
57
63
|
],
|
|
58
64
|
"examples": [
|
|
@@ -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": [
|