@gram-ai/elements 1.0.9 → 1.1.1
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/README.md +8 -4
- package/dist/components/assistant-ui/reasoning.d.ts +4 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/elements.css +1 -1
- package/dist/elements.js +2535 -2259
- package/dist/server.js +5 -2
- package/dist/types/index.d.ts +11 -0
- package/package.json +3 -2
package/dist/server.js
CHANGED
|
@@ -10547,14 +10547,17 @@ const Vf = "https://app.getgram.ai", Jf = () => ({
|
|
|
10547
10547
|
apiKey: "must be set",
|
|
10548
10548
|
headers: {
|
|
10549
10549
|
"Gram-Project": i.projectSlug,
|
|
10550
|
-
"Gram-Key": process.env.
|
|
10550
|
+
"Gram-Key": process.env.GRAM_API_KEY ?? ""
|
|
10551
10551
|
}
|
|
10552
10552
|
}), d = dd({
|
|
10553
10553
|
model: l.chat("openai/gpt-5.1"),
|
|
10554
10554
|
messages: hd(o),
|
|
10555
10555
|
tools: u
|
|
10556
10556
|
});
|
|
10557
|
-
t.setHeader("Content-Type", "text/event-stream"), t.setHeader("Cache-Control", "no-cache"), t.setHeader("Connection", "keep-alive"), t.setHeader("Transfer-Encoding", "chunked"), t.statusCode = 200, d.pipeUIMessageStreamToResponse(t
|
|
10557
|
+
t.setHeader("Content-Type", "text/event-stream"), t.setHeader("Cache-Control", "no-cache"), t.setHeader("Connection", "keep-alive"), t.setHeader("Transfer-Encoding", "chunked"), t.statusCode = 200, d.pipeUIMessageStreamToResponse(t, {
|
|
10558
|
+
sendReasoning: !0,
|
|
10559
|
+
sendSources: !0
|
|
10560
|
+
});
|
|
10558
10561
|
} catch (r) {
|
|
10559
10562
|
t.statusCode = 500, t.end(
|
|
10560
10563
|
JSON.stringify({
|
package/dist/types/index.d.ts
CHANGED
|
@@ -20,9 +20,20 @@ export interface ElementsConfig {
|
|
|
20
20
|
/**
|
|
21
21
|
* The Gram Server URL to use for the Elements library.
|
|
22
22
|
* Can be retrieved from https://app.getgram.ai/{team}/{project}/mcp/{mcp_slug}
|
|
23
|
+
*
|
|
23
24
|
* Note: This config option will likely change in the future
|
|
24
25
|
*/
|
|
25
26
|
mcp: ServerUrl;
|
|
27
|
+
/**
|
|
28
|
+
* The path of your backend's chat endpoint.
|
|
29
|
+
* @default '/chat/completions'
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* const config: ElementsConfig = {
|
|
33
|
+
* chatEndpoint: '/my-custom-chat-endpoint',
|
|
34
|
+
* }
|
|
35
|
+
*/
|
|
36
|
+
chatEndpoint?: string;
|
|
26
37
|
/**
|
|
27
38
|
* Custom environment variable overrides for the Elements library.
|
|
28
39
|
* Will be used to override the environment variables for the MCP server.
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@gram-ai/elements",
|
|
3
3
|
"description": "Gram Elements is a library of UI primitives for building chat-like experiences for MCP Servers.",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.1.1",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"zustand": "^5.0.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@gram-ai/sdk": "^0.2.3",
|
|
53
52
|
"@openrouter/ai-sdk-provider": "^1.4.1",
|
|
54
53
|
"@radix-ui/react-avatar": "^1.1.10",
|
|
54
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
55
55
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
56
56
|
"@radix-ui/react-slot": "^1.2.3",
|
|
57
57
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"lucide-react": "^0.544.0",
|
|
62
62
|
"sdk": "link:@types/@modelcontextprotocol/sdk",
|
|
63
63
|
"tailwind-merge": "^3.3.1",
|
|
64
|
+
"tw-shimmer": "^0.4.0",
|
|
64
65
|
"zod": "^4.1.13"
|
|
65
66
|
},
|
|
66
67
|
"devDependencies": {
|