nyxora 1.0.2 → 1.0.4
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 +10 -1
- package/.env.example +0 -17
- package/dashboard/eslint.config.js +0 -22
- package/dashboard/index.html +0 -13
- package/dashboard/package-lock.json +0 -2737
- package/dashboard/package.json +0 -31
- package/dashboard/public/favicon.svg +0 -1
- package/dashboard/public/icons.svg +0 -24
- package/dashboard/src/App.css +0 -184
- package/dashboard/src/App.tsx +0 -485
- package/dashboard/src/BalanceWidget.tsx +0 -65
- package/dashboard/src/MarketWidget.tsx +0 -73
- package/dashboard/src/Memory.tsx +0 -109
- package/dashboard/src/Overview.tsx +0 -156
- package/dashboard/src/Settings.tsx +0 -213
- package/dashboard/src/Skills.tsx +0 -97
- package/dashboard/src/SwapWidget.tsx +0 -130
- package/dashboard/src/TransactionWidget.tsx +0 -86
- package/dashboard/src/assets/hero.png +0 -0
- package/dashboard/src/assets/react.svg +0 -1
- package/dashboard/src/assets/vite.svg +0 -1
- package/dashboard/src/index.css +0 -508
- package/dashboard/src/main.tsx +0 -10
- package/dashboard/src/overview.css +0 -304
- package/dashboard/tsconfig.app.json +0 -25
- package/dashboard/tsconfig.json +0 -7
- package/dashboard/tsconfig.node.json +0 -24
- package/dashboard/vite.config.ts +0 -7
- package/src/agent/reasoning.d.ts +0 -2
- package/src/agent/reasoning.d.ts.map +0 -1
- package/src/agent/reasoning.js +0 -97
- package/src/agent/reasoning.js.map +0 -1
- package/src/agent/reasoning.ts +0 -232
- package/src/config/parser.d.ts +0 -17
- package/src/config/parser.d.ts.map +0 -1
- package/src/config/parser.js +0 -26
- package/src/config/parser.js.map +0 -1
- package/src/config/parser.ts +0 -47
- package/src/config/paths.ts +0 -33
- package/src/gateway/cli.d.ts +0 -3
- package/src/gateway/cli.d.ts.map +0 -1
- package/src/gateway/cli.js +0 -80
- package/src/gateway/cli.js.map +0 -1
- package/src/gateway/cli.ts +0 -69
- package/src/gateway/server.ts +0 -135
- package/src/gateway/telegram.ts +0 -47
- package/src/gateway/test.ts +0 -16
- package/src/gateway/tracker.ts +0 -70
- package/src/memory/logger.d.ts +0 -18
- package/src/memory/logger.d.ts.map +0 -1
- package/src/memory/logger.js +0 -51
- package/src/memory/logger.js.map +0 -1
- package/src/memory/logger.ts +0 -57
- package/src/web3/config.d.ts +0 -793
- package/src/web3/config.d.ts.map +0 -1
- package/src/web3/config.js +0 -81
- package/src/web3/config.js.map +0 -1
- package/src/web3/config.ts +0 -51
- package/src/web3/skills/getBalance.d.ts +0 -25
- package/src/web3/skills/getBalance.d.ts.map +0 -1
- package/src/web3/skills/getBalance.js +0 -46
- package/src/web3/skills/getBalance.js.map +0 -1
- package/src/web3/skills/getBalance.ts +0 -48
- package/src/web3/skills/getPrice.ts +0 -43
- package/src/web3/skills/swapToken.ts +0 -69
- package/src/web3/skills/transfer.ts +0 -47
- package/tsconfig.json +0 -13
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
.overview-container {
|
|
2
|
-
padding: 24px;
|
|
3
|
-
overflow-y: auto;
|
|
4
|
-
height: calc(100vh - 64px);
|
|
5
|
-
color: #fff;
|
|
6
|
-
font-family: 'Inter', sans-serif;
|
|
7
|
-
max-width: 1200px;
|
|
8
|
-
margin: 0 auto;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.overview-container::-webkit-scrollbar {
|
|
12
|
-
width: 6px;
|
|
13
|
-
}
|
|
14
|
-
.overview-container::-webkit-scrollbar-thumb {
|
|
15
|
-
background: rgba(255, 255, 255, 0.1);
|
|
16
|
-
border-radius: 4px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.overview-header h1 {
|
|
20
|
-
font-size: 1.5rem;
|
|
21
|
-
font-weight: 600;
|
|
22
|
-
margin-bottom: 4px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.overview-header p {
|
|
26
|
-
color: var(--text-secondary);
|
|
27
|
-
font-size: 0.9rem;
|
|
28
|
-
margin-bottom: 24px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.panel {
|
|
32
|
-
background: rgba(20, 24, 32, 0.6);
|
|
33
|
-
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
34
|
-
border-radius: 12px;
|
|
35
|
-
padding: 20px;
|
|
36
|
-
margin-bottom: 24px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.panel-header h3 {
|
|
40
|
-
font-size: 1.1rem;
|
|
41
|
-
font-weight: 600;
|
|
42
|
-
margin-bottom: 4px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.panel-header p {
|
|
46
|
-
color: var(--text-secondary);
|
|
47
|
-
font-size: 0.85rem;
|
|
48
|
-
margin-bottom: 16px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.form-group {
|
|
52
|
-
margin-bottom: 16px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.form-row {
|
|
56
|
-
display: flex;
|
|
57
|
-
gap: 16px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.flex-1 {
|
|
61
|
-
flex: 1;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
label {
|
|
65
|
-
display: block;
|
|
66
|
-
font-size: 0.75rem;
|
|
67
|
-
text-transform: uppercase;
|
|
68
|
-
color: var(--text-secondary);
|
|
69
|
-
margin-bottom: 8px;
|
|
70
|
-
letter-spacing: 0.05em;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
input, select {
|
|
74
|
-
width: 100%;
|
|
75
|
-
background: rgba(0, 0, 0, 0.3);
|
|
76
|
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
77
|
-
padding: 10px 12px;
|
|
78
|
-
border-radius: 8px;
|
|
79
|
-
color: white;
|
|
80
|
-
font-size: 0.9rem;
|
|
81
|
-
font-family: monospace;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
input:read-only {
|
|
85
|
-
color: var(--text-secondary);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.input-with-icon {
|
|
89
|
-
position: relative;
|
|
90
|
-
display: flex;
|
|
91
|
-
align-items: center;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.input-with-icon svg {
|
|
95
|
-
position: absolute;
|
|
96
|
-
right: 12px;
|
|
97
|
-
color: var(--text-secondary);
|
|
98
|
-
cursor: pointer;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.form-actions {
|
|
102
|
-
display: flex;
|
|
103
|
-
align-items: center;
|
|
104
|
-
gap: 12px;
|
|
105
|
-
margin-top: 20px;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.btn-primary {
|
|
109
|
-
background: #3b82f6;
|
|
110
|
-
color: white;
|
|
111
|
-
border: none;
|
|
112
|
-
padding: 8px 16px;
|
|
113
|
-
border-radius: 6px;
|
|
114
|
-
font-size: 0.9rem;
|
|
115
|
-
cursor: pointer;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.btn-secondary {
|
|
119
|
-
background: transparent;
|
|
120
|
-
color: white;
|
|
121
|
-
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
122
|
-
padding: 8px 16px;
|
|
123
|
-
border-radius: 6px;
|
|
124
|
-
font-size: 0.9rem;
|
|
125
|
-
cursor: pointer;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.action-hint {
|
|
129
|
-
color: var(--text-secondary);
|
|
130
|
-
font-size: 0.85rem;
|
|
131
|
-
margin-left: 8px;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.snapshot-grid {
|
|
135
|
-
display: grid;
|
|
136
|
-
grid-template-columns: repeat(4, 1fr);
|
|
137
|
-
gap: 20px;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.stat-val {
|
|
141
|
-
font-size: 1.5rem;
|
|
142
|
-
font-weight: 700;
|
|
143
|
-
margin-bottom: 4px;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.text-green {
|
|
147
|
-
color: #22c55e;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.stat-block p {
|
|
151
|
-
color: var(--text-secondary);
|
|
152
|
-
font-size: 0.8rem;
|
|
153
|
-
margin-top: 8px;
|
|
154
|
-
line-height: 1.4;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.metrics-grid {
|
|
158
|
-
display: grid;
|
|
159
|
-
grid-template-columns: repeat(5, 1fr);
|
|
160
|
-
gap: 16px;
|
|
161
|
-
margin-bottom: 32px;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.metric-card {
|
|
165
|
-
background: rgba(20, 24, 32, 0.6);
|
|
166
|
-
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
167
|
-
border-radius: 12px;
|
|
168
|
-
padding: 16px;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.metric-val {
|
|
172
|
-
font-size: 1.5rem;
|
|
173
|
-
font-weight: 700;
|
|
174
|
-
margin-bottom: 4px;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.metric-sub {
|
|
178
|
-
color: var(--text-secondary);
|
|
179
|
-
font-size: 0.75rem;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.section-title {
|
|
183
|
-
font-size: 0.75rem;
|
|
184
|
-
text-transform: uppercase;
|
|
185
|
-
color: var(--text-secondary);
|
|
186
|
-
margin-bottom: 12px;
|
|
187
|
-
letter-spacing: 0.05em;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.session-item {
|
|
191
|
-
display: flex;
|
|
192
|
-
justify-content: space-between;
|
|
193
|
-
padding: 16px 20px;
|
|
194
|
-
margin-bottom: 24px;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.text-secondary {
|
|
198
|
-
color: var(--text-secondary);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.attention-panel {
|
|
202
|
-
background: rgba(234, 179, 8, 0.1);
|
|
203
|
-
border: 1px solid rgba(234, 179, 8, 0.2);
|
|
204
|
-
border-radius: 12px;
|
|
205
|
-
padding: 16px 20px;
|
|
206
|
-
margin-bottom: 24px;
|
|
207
|
-
display: flex;
|
|
208
|
-
flex-direction: column;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.attention-header {
|
|
212
|
-
display: flex;
|
|
213
|
-
align-items: center;
|
|
214
|
-
gap: 8px;
|
|
215
|
-
color: #eab308;
|
|
216
|
-
margin-bottom: 8px;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.attention-header h4 {
|
|
220
|
-
font-size: 1rem;
|
|
221
|
-
font-weight: 600;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.attention-content p {
|
|
225
|
-
font-size: 0.95rem;
|
|
226
|
-
margin-bottom: 4px;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.attention-content span {
|
|
230
|
-
font-size: 0.85rem;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.logs-grid {
|
|
234
|
-
display: grid;
|
|
235
|
-
grid-template-columns: 1fr 1fr;
|
|
236
|
-
gap: 16px;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.log-panel {
|
|
240
|
-
background: rgba(10, 12, 16, 0.8);
|
|
241
|
-
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
242
|
-
border-radius: 12px;
|
|
243
|
-
overflow: hidden;
|
|
244
|
-
display: flex;
|
|
245
|
-
flex-direction: column;
|
|
246
|
-
height: 300px;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.log-header {
|
|
250
|
-
padding: 12px 16px;
|
|
251
|
-
background: rgba(255, 255, 255, 0.05);
|
|
252
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
|
253
|
-
font-size: 0.85rem;
|
|
254
|
-
font-weight: 600;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.badge {
|
|
258
|
-
background: rgba(255, 255, 255, 0.1);
|
|
259
|
-
padding: 2px 6px;
|
|
260
|
-
border-radius: 10px;
|
|
261
|
-
font-size: 0.7rem;
|
|
262
|
-
margin-left: 8px;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.log-content {
|
|
266
|
-
padding: 12px 16px;
|
|
267
|
-
overflow-y: auto;
|
|
268
|
-
display: flex;
|
|
269
|
-
flex-direction: column;
|
|
270
|
-
gap: 4px;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.log-content code, .log-json {
|
|
274
|
-
font-family: 'Consolas', 'Monaco', monospace;
|
|
275
|
-
font-size: 0.75rem;
|
|
276
|
-
color: #a3a3a3;
|
|
277
|
-
line-height: 1.4;
|
|
278
|
-
word-break: break-all;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.log-row {
|
|
282
|
-
display: flex;
|
|
283
|
-
gap: 12px;
|
|
284
|
-
font-family: 'Consolas', 'Monaco', monospace;
|
|
285
|
-
font-size: 0.75rem;
|
|
286
|
-
margin-bottom: 4px;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.log-time {
|
|
290
|
-
color: #fb923c;
|
|
291
|
-
min-width: 60px;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.log-msg {
|
|
295
|
-
color: #d1d5db;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
.log-meta {
|
|
299
|
-
color: #6b7280;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
.gateway-row {
|
|
303
|
-
margin-bottom: 2px;
|
|
304
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
4
|
-
"target": "es2023",
|
|
5
|
-
"lib": ["ES2023", "DOM"],
|
|
6
|
-
"module": "esnext",
|
|
7
|
-
"types": ["vite/client"],
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
|
|
10
|
-
/* Bundler mode */
|
|
11
|
-
"moduleResolution": "bundler",
|
|
12
|
-
"allowImportingTsExtensions": true,
|
|
13
|
-
"verbatimModuleSyntax": true,
|
|
14
|
-
"moduleDetection": "force",
|
|
15
|
-
"noEmit": true,
|
|
16
|
-
"jsx": "react-jsx",
|
|
17
|
-
|
|
18
|
-
/* Linting */
|
|
19
|
-
"noUnusedLocals": true,
|
|
20
|
-
"noUnusedParameters": true,
|
|
21
|
-
"erasableSyntaxOnly": true,
|
|
22
|
-
"noFallthroughCasesInSwitch": true
|
|
23
|
-
},
|
|
24
|
-
"include": ["src"]
|
|
25
|
-
}
|
package/dashboard/tsconfig.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
-
"target": "es2023",
|
|
5
|
-
"lib": ["ES2023"],
|
|
6
|
-
"module": "esnext",
|
|
7
|
-
"types": ["node"],
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
|
|
10
|
-
/* Bundler mode */
|
|
11
|
-
"moduleResolution": "bundler",
|
|
12
|
-
"allowImportingTsExtensions": true,
|
|
13
|
-
"verbatimModuleSyntax": true,
|
|
14
|
-
"moduleDetection": "force",
|
|
15
|
-
"noEmit": true,
|
|
16
|
-
|
|
17
|
-
/* Linting */
|
|
18
|
-
"noUnusedLocals": true,
|
|
19
|
-
"noUnusedParameters": true,
|
|
20
|
-
"erasableSyntaxOnly": true,
|
|
21
|
-
"noFallthroughCasesInSwitch": true
|
|
22
|
-
},
|
|
23
|
-
"include": ["vite.config.ts"]
|
|
24
|
-
}
|
package/dashboard/vite.config.ts
DELETED
package/src/agent/reasoning.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reasoning.d.ts","sourceRoot":"","sources":["reasoning.ts"],"names":[],"mappings":"AAkBA,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAmFrE"}
|
package/src/agent/reasoning.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.processUserInput = processUserInput;
|
|
4
|
-
const openai_1 = require("openai");
|
|
5
|
-
const parser_1 = require("../config/parser");
|
|
6
|
-
const logger_1 = require("../memory/logger");
|
|
7
|
-
const getBalance_1 = require("../web3/skills/getBalance");
|
|
8
|
-
const config = (0, parser_1.loadConfig)();
|
|
9
|
-
const logger = new logger_1.Logger();
|
|
10
|
-
// Initialize OpenAI client
|
|
11
|
-
const openai = new openai_1.OpenAI({
|
|
12
|
-
apiKey: process.env.OPENAI_API_KEY,
|
|
13
|
-
});
|
|
14
|
-
const systemPrompt = `You are an autonomous Web3 agent operating on EVM chains.
|
|
15
|
-
Your wallet address is available via the tools.
|
|
16
|
-
Always use the tools to interact with the blockchain.
|
|
17
|
-
If the user doesn't specify a chain, default to: ${config.agent.default_chain}.`;
|
|
18
|
-
async function processUserInput(input) {
|
|
19
|
-
// Add user input to memory
|
|
20
|
-
logger.addEntry({ role: 'user', content: input });
|
|
21
|
-
const history = logger.getHistory();
|
|
22
|
-
// Format messages for OpenAI
|
|
23
|
-
const messages = [
|
|
24
|
-
{ role: 'system', content: systemPrompt },
|
|
25
|
-
...history.map(m => {
|
|
26
|
-
const msg = { role: m.role, content: m.content || "" };
|
|
27
|
-
if (m.name)
|
|
28
|
-
msg.name = m.name;
|
|
29
|
-
if (m.tool_call_id)
|
|
30
|
-
msg.tool_call_id = m.tool_call_id;
|
|
31
|
-
if (m.tool_calls)
|
|
32
|
-
msg.tool_calls = m.tool_calls;
|
|
33
|
-
return msg;
|
|
34
|
-
})
|
|
35
|
-
];
|
|
36
|
-
try {
|
|
37
|
-
if (config.llm.provider !== 'openai') {
|
|
38
|
-
return `Provider ${config.llm.provider} is configured, but currently only OpenAI adapter is fully implemented in this demo.`;
|
|
39
|
-
}
|
|
40
|
-
const response = await openai.chat.completions.create({
|
|
41
|
-
model: config.llm.model,
|
|
42
|
-
temperature: config.llm.temperature,
|
|
43
|
-
messages: messages,
|
|
44
|
-
tools: [getBalance_1.getBalanceToolDefinition],
|
|
45
|
-
tool_choice: "auto",
|
|
46
|
-
});
|
|
47
|
-
const responseMessage = response.choices[0].message;
|
|
48
|
-
// Log assistant response
|
|
49
|
-
logger.addEntry({
|
|
50
|
-
role: 'assistant',
|
|
51
|
-
content: responseMessage.content || "",
|
|
52
|
-
tool_calls: responseMessage.tool_calls,
|
|
53
|
-
});
|
|
54
|
-
// Check if the model wants to call a tool
|
|
55
|
-
if (responseMessage.tool_calls && responseMessage.tool_calls.length > 0) {
|
|
56
|
-
for (const toolCall of responseMessage.tool_calls) {
|
|
57
|
-
if (toolCall.function.name === 'get_balance') {
|
|
58
|
-
const args = JSON.parse(toolCall.function.arguments);
|
|
59
|
-
const balanceResult = await (0, getBalance_1.getBalance)(args.chainName, args.address);
|
|
60
|
-
logger.addEntry({
|
|
61
|
-
role: 'tool',
|
|
62
|
-
tool_call_id: toolCall.id,
|
|
63
|
-
name: toolCall.function.name,
|
|
64
|
-
content: balanceResult,
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
// Second call to get the final answer after tool execution
|
|
69
|
-
const secondMessages = [
|
|
70
|
-
{ role: 'system', content: systemPrompt },
|
|
71
|
-
...logger.getHistory().map(m => {
|
|
72
|
-
const msg = { role: m.role, content: m.content || "" };
|
|
73
|
-
if (m.name)
|
|
74
|
-
msg.name = m.name;
|
|
75
|
-
if (m.tool_call_id)
|
|
76
|
-
msg.tool_call_id = m.tool_call_id;
|
|
77
|
-
if (m.tool_calls)
|
|
78
|
-
msg.tool_calls = m.tool_calls;
|
|
79
|
-
return msg;
|
|
80
|
-
})
|
|
81
|
-
];
|
|
82
|
-
const secondResponse = await openai.chat.completions.create({
|
|
83
|
-
model: config.llm.model,
|
|
84
|
-
messages: secondMessages,
|
|
85
|
-
});
|
|
86
|
-
const finalContent = secondResponse.choices[0].message.content || "";
|
|
87
|
-
logger.addEntry({ role: 'assistant', content: finalContent });
|
|
88
|
-
return finalContent;
|
|
89
|
-
}
|
|
90
|
-
return responseMessage.content || "No response generated.";
|
|
91
|
-
}
|
|
92
|
-
catch (error) {
|
|
93
|
-
console.error("LLM Error:", error);
|
|
94
|
-
return `Error connecting to AI Provider: ${error.message}`;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
//# sourceMappingURL=reasoning.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reasoning.js","sourceRoot":"","sources":["reasoning.ts"],"names":[],"mappings":";;AAkBA,4CAmFC;AArGD,mCAAgC;AAChC,6CAA8C;AAC9C,6CAA0C;AAC1C,0DAAiF;AAEjF,MAAM,MAAM,GAAG,IAAA,mBAAU,GAAE,CAAC;AAC5B,MAAM,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;AAE5B,2BAA2B;AAC3B,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc;CACnC,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG;;;mDAG8B,MAAM,CAAC,KAAK,CAAC,aAAa,GAAG,CAAC;AAE1E,KAAK,UAAU,gBAAgB,CAAC,KAAa;IAClD,2BAA2B;IAC3B,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IAElD,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;IAEpC,6BAA6B;IAC7B,MAAM,QAAQ,GAAU;QACtB,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE;QACzC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;YACjB,MAAM,GAAG,GAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,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