langgraph-ui-components 0.0.28 → 0.0.29
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/package.json +9 -1
- package/src/App.css +0 -183
- package/src/App.tsx +0 -70
- package/src/main.tsx +0 -9
package/package.json
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "langgraph-ui-components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.29",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/Karthik-MP/langgraph-ui-components.git"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/Karthik-MP/langgraph-ui-components#readme",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/Karthik-MP/langgraph-ui-components/issues"
|
|
12
|
+
},
|
|
5
13
|
"type": "module",
|
|
6
14
|
"main": "./dist/index.cjs.js",
|
|
7
15
|
"module": "./dist/index.es.js",
|
package/src/App.css
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
@import "tailwindcss";
|
|
2
|
-
@plugin "tailwindcss-animate";
|
|
3
|
-
@custom-variant dark (&:is(.dark *));
|
|
4
|
-
|
|
5
|
-
/* keep only library utility classes */
|
|
6
|
-
.scrollbar-none::-webkit-scrollbar {
|
|
7
|
-
display: none;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.scrollbar-none {
|
|
11
|
-
-ms-overflow-style: none;
|
|
12
|
-
scrollbar-width: none;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.thread-scrollbar::-webkit-scrollbar {
|
|
16
|
-
width: 12px !important;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.thread-scrollbar::-webkit-scrollbar-track {
|
|
20
|
-
background: #18181b !important;
|
|
21
|
-
border-radius: 9999px !important;
|
|
22
|
-
margin: 12px 0 !important;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.thread-scrollbar::-webkit-scrollbar-thumb {
|
|
26
|
-
background: #3f3f46 !important;
|
|
27
|
-
border-radius: 9999px !important;
|
|
28
|
-
border: 2px solid #18181b !important;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.thread-scrollbar::-webkit-scrollbar-thumb:hover {
|
|
32
|
-
background: #52525b !important;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.agent-message {
|
|
36
|
-
font-family: "Inter", "Inter Fallback", system-ui, sans-serif;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
:root {
|
|
40
|
-
--background: oklch(1 0 0);
|
|
41
|
-
--foreground: oklch(0.145 0 0);
|
|
42
|
-
--card: oklch(1 0 0);
|
|
43
|
-
--card-foreground: oklch(0.145 0 0);
|
|
44
|
-
--popover: oklch(1 0 0);
|
|
45
|
-
--popover-foreground: oklch(0.145 0 0);
|
|
46
|
-
--primary: oklch(0.205 0 0);
|
|
47
|
-
--primary-foreground: oklch(0.985 0 0);
|
|
48
|
-
--secondary: oklch(0.97 0 0);
|
|
49
|
-
--secondary-foreground: oklch(0.205 0 0);
|
|
50
|
-
--muted: oklch(0.97 0 0);
|
|
51
|
-
--muted-foreground: oklch(0.556 0 0);
|
|
52
|
-
--accent: oklch(0.97 0 0);
|
|
53
|
-
--accent-foreground: oklch(0.205 0 0);
|
|
54
|
-
--destructive: oklch(0.577 0.245 27.325);
|
|
55
|
-
--destructive-foreground: oklch(0.577 0.245 27.325);
|
|
56
|
-
--border: oklch(0.922 0 0);
|
|
57
|
-
--input: oklch(0.922 0 0);
|
|
58
|
-
--ring: oklch(0.87 0 0);
|
|
59
|
-
--chart-1: oklch(0.646 0.222 41.116);
|
|
60
|
-
--chart-2: oklch(0.6 0.118 184.704);
|
|
61
|
-
--chart-3: oklch(0.398 0.07 227.392);
|
|
62
|
-
--chart-4: oklch(0.828 0.189 84.429);
|
|
63
|
-
--chart-5: oklch(0.769 0.188 70.08);
|
|
64
|
-
--radius: 0.625rem;
|
|
65
|
-
--sidebar: oklch(0.985 0 0);
|
|
66
|
-
--sidebar-foreground: oklch(0.145 0 0);
|
|
67
|
-
--sidebar-primary: oklch(0.205 0 0);
|
|
68
|
-
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
69
|
-
--sidebar-accent: oklch(0.97 0 0);
|
|
70
|
-
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
71
|
-
--sidebar-border: oklch(0.922 0 0);
|
|
72
|
-
--sidebar-ring: oklch(0.87 0 0);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.dark {
|
|
76
|
-
--background: oklch(0.145 0 0);
|
|
77
|
-
--foreground: oklch(0.985 0 0);
|
|
78
|
-
--card: oklch(0.145 0 0);
|
|
79
|
-
--card-foreground: oklch(0.985 0 0);
|
|
80
|
-
--popover: oklch(0.145 0 0);
|
|
81
|
-
--popover-foreground: oklch(0.985 0 0);
|
|
82
|
-
--primary: oklch(0.985 0 0);
|
|
83
|
-
--primary-foreground: oklch(0.205 0 0);
|
|
84
|
-
--secondary: oklch(0.269 0 0);
|
|
85
|
-
--secondary-foreground: oklch(0.985 0 0);
|
|
86
|
-
--muted: oklch(0.269 0 0);
|
|
87
|
-
--muted-foreground: oklch(0.708 0 0);
|
|
88
|
-
--accent: oklch(0.269 0 0);
|
|
89
|
-
--accent-foreground: oklch(0.985 0 0);
|
|
90
|
-
--destructive: oklch(0.396 0.141 25.723);
|
|
91
|
-
--destructive-foreground: oklch(0.637 0.237 25.331);
|
|
92
|
-
--border: oklch(0.269 0 0);
|
|
93
|
-
--input: oklch(0.269 0 0);
|
|
94
|
-
--ring: oklch(0.439 0 0);
|
|
95
|
-
--chart-1: oklch(0.488 0.243 264.376);
|
|
96
|
-
--chart-2: oklch(0.696 0.17 162.48);
|
|
97
|
-
--chart-3: oklch(0.769 0.188 70.08);
|
|
98
|
-
--chart-4: oklch(0.627 0.265 303.9);
|
|
99
|
-
--chart-5: oklch(0.645 0.246 16.439);
|
|
100
|
-
--sidebar: oklch(0.205 0 0);
|
|
101
|
-
--sidebar-foreground: oklch(0.985 0 0);
|
|
102
|
-
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
103
|
-
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
104
|
-
--sidebar-accent: oklch(0.269 0 0);
|
|
105
|
-
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
106
|
-
--sidebar-border: oklch(0.269 0 0);
|
|
107
|
-
--sidebar-ring: oklch(0.439 0 0);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
@theme inline {
|
|
111
|
-
--color-background: var(--background);
|
|
112
|
-
--color-foreground: var(--foreground);
|
|
113
|
-
--color-card: var(--card);
|
|
114
|
-
--color-card-foreground: var(--card-foreground);
|
|
115
|
-
--color-popover: var(--popover);
|
|
116
|
-
--color-popover-foreground: var(--popover-foreground);
|
|
117
|
-
--color-primary: var(--primary);
|
|
118
|
-
--color-primary-foreground: var(--primary-foreground);
|
|
119
|
-
--color-secondary: var(--secondary);
|
|
120
|
-
--color-secondary-foreground: var(--secondary-foreground);
|
|
121
|
-
--color-muted: var(--muted);
|
|
122
|
-
--color-muted-foreground: var(--muted-foreground);
|
|
123
|
-
--color-accent: var(--accent);
|
|
124
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
125
|
-
--color-destructive: var(--destructive);
|
|
126
|
-
--color-destructive-foreground: var(--destructive-foreground);
|
|
127
|
-
--color-border: var(--border);
|
|
128
|
-
--color-input: var(--input);
|
|
129
|
-
--color-ring: var(--ring);
|
|
130
|
-
--color-chart-1: var(--chart-1);
|
|
131
|
-
--color-chart-2: var(--chart-2);
|
|
132
|
-
--color-chart-3: var(--chart-3);
|
|
133
|
-
--color-chart-4: var(--chart-4);
|
|
134
|
-
--color-chart-5: var(--chart-5);
|
|
135
|
-
--radius-sm: calc(var(--radius) - 4px);
|
|
136
|
-
--radius-md: calc(var(--radius) - 2px);
|
|
137
|
-
--radius-lg: var(--radius);
|
|
138
|
-
--radius-xl: calc(var(--radius) + 4px);
|
|
139
|
-
--color-sidebar: var(--sidebar);
|
|
140
|
-
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
141
|
-
--color-sidebar-primary: var(--sidebar-primary);
|
|
142
|
-
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
143
|
-
--color-sidebar-accent: var(--sidebar-accent);
|
|
144
|
-
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
145
|
-
--color-sidebar-border: var(--sidebar-border);
|
|
146
|
-
--color-sidebar-ring: var(--sidebar-ring);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
@layer base {
|
|
150
|
-
* {
|
|
151
|
-
@apply border-border outline-ring/50;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
body {
|
|
155
|
-
@apply bg-background text-foreground;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
:root {
|
|
159
|
-
--chart-1: 12 76% 61%;
|
|
160
|
-
--chart-2: 173 58% 39%;
|
|
161
|
-
--chart-3: 197 37% 24%;
|
|
162
|
-
--chart-4: 43 74% 66%;
|
|
163
|
-
--chart-5: 27 87% 67%;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.dark {
|
|
167
|
-
--chart-1: 220 70% 50%;
|
|
168
|
-
--chart-2: 160 60% 45%;
|
|
169
|
-
--chart-3: 30 80% 55%;
|
|
170
|
-
--chart-4: 280 65% 60%;
|
|
171
|
-
--chart-5: 340 75% 55%;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
@layer utilities {
|
|
176
|
-
.shadow-inner-right {
|
|
177
|
-
box-shadow: inset -9px 0 6px -1px rgb(0 0 0 / 0.02);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.shadow-inner-left {
|
|
181
|
-
box-shadow: inset 9px 0 6px -1px rgb(0 0 0 / 0.02);
|
|
182
|
-
}
|
|
183
|
-
}
|
package/src/App.tsx
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import "./App.css";
|
|
3
|
-
import Sidebar from "./pages/Sidebar/sidebar";
|
|
4
|
-
import {
|
|
5
|
-
ChatRuntimeProvider,
|
|
6
|
-
type ChatIdentity,
|
|
7
|
-
} from "./providers/ChatRuntime";
|
|
8
|
-
import { ThreadProvider } from "./providers/Thread";
|
|
9
|
-
import { StreamProvider } from "./providers/Stream";
|
|
10
|
-
import { FileProvider } from "./providers/FileProvider";
|
|
11
|
-
import { CustomComponentProvider } from "./providers/CustomComponentProvider";
|
|
12
|
-
import useChatSuggestions, { SuggestionProvider } from "./providers/useChatSuggestions";
|
|
13
|
-
import { Chat } from "./pages/Chat/Chat";
|
|
14
|
-
// import { Chat } from "./pages/Chat/Chat";
|
|
15
|
-
|
|
16
|
-
function ChatWrapper({ children }: { children?: React.ReactNode }) {
|
|
17
|
-
useChatSuggestions({
|
|
18
|
-
instructions: "Suggest helpful next actions",
|
|
19
|
-
minSuggestions: 1,
|
|
20
|
-
maxSuggestions: 2,
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const textToSpeechVoice = {
|
|
24
|
-
apiUrl: "https://whisper.gauravshivaprasad.com/v1/audio/transcriptions",
|
|
25
|
-
apiKey: "sk-UqngFFpeT8V1j6LQh44zGhQU71W14A02VrY2n6K7eT1qsyE5",
|
|
26
|
-
model: "Systran/faster-whisper-small"
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return (<>
|
|
30
|
-
<Sidebar supportChatHistory={true} textToSpeechVoice={textToSpeechVoice} />
|
|
31
|
-
{/* <Chat textToSpeechVoice={textToSpeechVoice} /> */}
|
|
32
|
-
{children}
|
|
33
|
-
</>
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function App() {
|
|
39
|
-
const [identity] = useState<ChatIdentity>({
|
|
40
|
-
user_id: "68f3b3ba4ce23e5b582b7780",
|
|
41
|
-
org_id: "1",
|
|
42
|
-
quote_id: "695b5cfcc4d07dc56f093d92",
|
|
43
|
-
authToken: "xQpz7LPUqh5nArwn8Boam6JpJX2BOXf4NDcJ9kEEuWc",
|
|
44
|
-
});
|
|
45
|
-
return (
|
|
46
|
-
<React.Suspense fallback={<div>Loading (layout)...</div>}>
|
|
47
|
-
<ChatRuntimeProvider
|
|
48
|
-
apiUrl={"https://agents.3ya.io"}
|
|
49
|
-
assistantId={"chat_agent"}
|
|
50
|
-
// apiUrl={"https://agents.3ya.io"}
|
|
51
|
-
// assistantId={"v3ya_external_agent"}
|
|
52
|
-
identity={identity}
|
|
53
|
-
>
|
|
54
|
-
<ThreadProvider>
|
|
55
|
-
<StreamProvider>
|
|
56
|
-
<CustomComponentProvider>
|
|
57
|
-
<SuggestionProvider>
|
|
58
|
-
<FileProvider>
|
|
59
|
-
<ChatWrapper />
|
|
60
|
-
</FileProvider>
|
|
61
|
-
</SuggestionProvider>
|
|
62
|
-
</CustomComponentProvider>
|
|
63
|
-
</StreamProvider>
|
|
64
|
-
</ThreadProvider>
|
|
65
|
-
</ChatRuntimeProvider>
|
|
66
|
-
</React.Suspense>
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export default App;
|