agdi 3.3.4 → 3.3.5
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.js +124 -55
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4260,7 +4260,7 @@ import { render } from "ink";
|
|
|
4260
4260
|
|
|
4261
4261
|
// src/ui/tui.tsx
|
|
4262
4262
|
import { useState, useEffect } from "react";
|
|
4263
|
-
import { Box, Text, useApp } from "ink";
|
|
4263
|
+
import { Box, Text, useApp, Spacer } from "ink";
|
|
4264
4264
|
import TextInput from "ink-text-input";
|
|
4265
4265
|
import fs7 from "fs";
|
|
4266
4266
|
import path7 from "path";
|
|
@@ -4268,11 +4268,22 @@ import os from "os";
|
|
|
4268
4268
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4269
4269
|
var THEME2 = {
|
|
4270
4270
|
bg: "black",
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
text
|
|
4274
|
-
dim: "
|
|
4275
|
-
|
|
4271
|
+
// Main background
|
|
4272
|
+
text: "#E5E5E5",
|
|
4273
|
+
// Primary text
|
|
4274
|
+
dim: "#6B7280",
|
|
4275
|
+
// Secondary/Dim text
|
|
4276
|
+
accent: "#3B82F6",
|
|
4277
|
+
// Brand Blue
|
|
4278
|
+
border: "#374151",
|
|
4279
|
+
// Dark gray border
|
|
4280
|
+
success: "#10B981",
|
|
4281
|
+
warning: "#F59E0B",
|
|
4282
|
+
error: "#EF4444",
|
|
4283
|
+
cardBg: "#111827",
|
|
4284
|
+
// Slightly lighter bg for cards
|
|
4285
|
+
highlight: "#1F2937"
|
|
4286
|
+
// Hover/Selection state
|
|
4276
4287
|
};
|
|
4277
4288
|
var BootScreen = ({ onComplete }) => {
|
|
4278
4289
|
const [progress, setProgress] = useState(0);
|
|
@@ -4298,60 +4309,114 @@ var BootScreen = ({ onComplete }) => {
|
|
|
4298
4309
|
] })
|
|
4299
4310
|
] });
|
|
4300
4311
|
};
|
|
4312
|
+
var Header = () => {
|
|
4313
|
+
return /* @__PURE__ */ jsxs(Box, { borderStyle: "single", borderColor: THEME2.border, paddingX: 1, flexDirection: "row", justifyContent: "space-between", children: [
|
|
4314
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
4315
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.warning, children: "\u26A1 " }),
|
|
4316
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: THEME2.text, children: "Starter " }),
|
|
4317
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: os.homedir() })
|
|
4318
|
+
] }),
|
|
4319
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: "Agdi v3.3.4" }) })
|
|
4320
|
+
] });
|
|
4321
|
+
};
|
|
4322
|
+
var Footer = ({ status }) => {
|
|
4323
|
+
return /* @__PURE__ */ jsxs(Box, { borderStyle: "single", borderColor: THEME2.border, borderTop: false, paddingX: 1, flexDirection: "row", justifyContent: "space-between", children: [
|
|
4324
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
4325
|
+
/* @__PURE__ */ jsx(Text, { color: status === "IDLE" ? THEME2.success : THEME2.warning, children: "\u25CF " }),
|
|
4326
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: status })
|
|
4327
|
+
] }),
|
|
4328
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: "CONNECT TELEGRAM / WHATSAPP (ALPHA)" }) }),
|
|
4329
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { color: THEME2.error, children: "Stop & Disconnect" }) })
|
|
4330
|
+
] });
|
|
4331
|
+
};
|
|
4301
4332
|
var Sidebar = ({ history }) => {
|
|
4302
|
-
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", width:
|
|
4303
|
-
/* @__PURE__ */ jsx(Box, { marginBottom: 1, borderStyle: "
|
|
4333
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", width: 32, borderStyle: "single", borderColor: THEME2.border, borderRight: false, borderTop: false, borderBottom: false, paddingX: 1, children: [
|
|
4334
|
+
/* @__PURE__ */ jsx(Box, { marginBottom: 1, borderStyle: "round", borderColor: THEME2.text, justifyContent: "center", paddingX: 1, children: /* @__PURE__ */ jsx(Text, { bold: true, color: THEME2.text, children: "+ New task" }) }),
|
|
4304
4335
|
/* @__PURE__ */ jsx(Text, { color: THEME2.dim, bold: true, children: "RECENTS" }),
|
|
4305
|
-
/* @__PURE__ */ jsx(Box, { flexDirection: "column", marginTop: 0, children: history.length === 0 ? /* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: "No recent sessions" }) : history.map((h, i) => /* @__PURE__ */
|
|
4336
|
+
/* @__PURE__ */ jsx(Box, { flexDirection: "column", marginTop: 0, children: history.length === 0 ? /* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: "No recent sessions" }) : history.map((h, i) => /* @__PURE__ */ jsxs(Box, { flexDirection: "row", justifyContent: "space-between", marginBottom: 0, children: [
|
|
4337
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.text, children: h.length > 18 ? h.substring(0, 15) + "..." : h }),
|
|
4338
|
+
/* @__PURE__ */ jsx(Box, { borderStyle: "single", borderColor: THEME2.dim, paddingX: 1, marginLeft: 1, children: /* @__PURE__ */ jsx(Text, { color: THEME2.dim, dimColor: true, children: "STARTER" }) })
|
|
4339
|
+
] }, i)) })
|
|
4306
4340
|
] });
|
|
4307
4341
|
};
|
|
4308
4342
|
var ContextPanel = ({ files, agentStatus }) => {
|
|
4309
|
-
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", width:
|
|
4310
|
-
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
|
|
4311
|
-
/* @__PURE__ */ jsx(Text, { bold: true, children: "Context" }),
|
|
4312
|
-
/* @__PURE__ */
|
|
4313
|
-
|
|
4314
|
-
"
|
|
4315
|
-
|
|
4316
|
-
|
|
4343
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", width: 35, borderStyle: "single", borderColor: THEME2.border, borderLeft: false, borderTop: false, borderBottom: false, paddingX: 1, children: [
|
|
4344
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, borderStyle: "single", borderColor: THEME2.border, padding: 0, children: [
|
|
4345
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: THEME2.text, children: " Context" }),
|
|
4346
|
+
/* @__PURE__ */ jsxs(Box, { marginLeft: 1, flexDirection: "column", children: [
|
|
4347
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.dim, bold: true, children: "WORKING FILES" }),
|
|
4348
|
+
files.length === 0 ? /* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: "None yet." }) : files.slice(0, 5).map((f, i) => (
|
|
4349
|
+
// @ts-expect-error: Ink type definition mismatch for key prop
|
|
4350
|
+
/* @__PURE__ */ jsxs(Text, { color: THEME2.accent, children: [
|
|
4351
|
+
"\u{1F4C4} ",
|
|
4352
|
+
f
|
|
4353
|
+
] }, i)
|
|
4354
|
+
))
|
|
4355
|
+
] })
|
|
4317
4356
|
] }),
|
|
4318
|
-
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, borderStyle: "single", borderColor: THEME2.
|
|
4319
|
-
/* @__PURE__ */ jsx(Text, { bold: true, children: " Plugins" }),
|
|
4320
|
-
/* @__PURE__ */
|
|
4321
|
-
|
|
4357
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, borderStyle: "single", borderColor: THEME2.border, padding: 0, children: [
|
|
4358
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: THEME2.text, children: " Plugins" }),
|
|
4359
|
+
/* @__PURE__ */ jsxs(Box, { marginLeft: 1, flexDirection: "column", children: [
|
|
4360
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.success, children: "\u2022 Scheduler" }),
|
|
4361
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: " Run scheduled jobs" })
|
|
4362
|
+
] })
|
|
4363
|
+
] }),
|
|
4364
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, borderStyle: "single", borderColor: THEME2.border, padding: 0, children: [
|
|
4365
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: THEME2.text, children: " MCP" }),
|
|
4366
|
+
/* @__PURE__ */ jsxs(Box, { marginLeft: 1, flexDirection: "column", children: [
|
|
4367
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.success, children: "\u2022 chrome-devtools" }),
|
|
4368
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: " Connected - npx -y chrome..." })
|
|
4369
|
+
] })
|
|
4322
4370
|
] }),
|
|
4323
|
-
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
4324
|
-
/* @__PURE__ */ jsx(Text, { bold: true, children: "
|
|
4325
|
-
/* @__PURE__ */ jsxs(
|
|
4326
|
-
"\
|
|
4327
|
-
|
|
4371
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: THEME2.border, padding: 0, children: [
|
|
4372
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: THEME2.text, children: " Skills" }),
|
|
4373
|
+
/* @__PURE__ */ jsxs(Box, { marginLeft: 1, flexDirection: "column", children: [
|
|
4374
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: "\u2394 Agent Creator" }),
|
|
4375
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.dim, dimColor: true, children: " bash" }),
|
|
4376
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: "\u2394 Command Creator" }),
|
|
4377
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.dim, dimColor: true, children: " bash" })
|
|
4328
4378
|
] })
|
|
4329
4379
|
] })
|
|
4330
4380
|
] });
|
|
4331
4381
|
};
|
|
4332
4382
|
var ChatArea = ({ history, onSend, placeholder }) => {
|
|
4333
4383
|
const [query, setQuery] = useState("");
|
|
4334
|
-
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", flexGrow: 1, borderStyle: "single", borderColor: THEME2.border, marginLeft: 0, marginRight: 0, children: [
|
|
4335
|
-
/* @__PURE__ */ jsx(Box, { justifyContent: "center", borderStyle: "single", borderBottomColor: THEME2.border, borderTop: false, borderLeft: false, borderRight: false, paddingBottom: 0, children: /* @__PURE__ */ jsx(Text, { bold: true, children: "Start a conversation" }) }),
|
|
4384
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", flexGrow: 1, borderStyle: "single", borderColor: THEME2.border, borderTop: false, borderBottom: false, marginLeft: 0, marginRight: 0, children: [
|
|
4336
4385
|
/* @__PURE__ */ jsx(Box, { flexDirection: "column", flexGrow: 1, padding: 1, justifyContent: "flex-end", children: history.length === 0 ? /* @__PURE__ */ jsxs(Box, { flexDirection: "column", alignItems: "center", justifyContent: "center", height: 10, children: [
|
|
4337
|
-
/* @__PURE__ */ jsx(
|
|
4338
|
-
/* @__PURE__ */ jsx(Text, { color: THEME2.
|
|
4339
|
-
|
|
4340
|
-
/* @__PURE__ */ jsx(Text, {
|
|
4386
|
+
/* @__PURE__ */ jsx(Box, { borderStyle: "round", borderColor: THEME2.border, padding: 1, marginBottom: 1, children: /* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: "\u26A1" }) }),
|
|
4387
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: THEME2.text, children: "Start a conversation" }),
|
|
4388
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: "Describe what you want to do, and Agdi will take it" }),
|
|
4389
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: "from there." })
|
|
4390
|
+
] }) : history.slice(-10).map((msg, i) => /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, borderStyle: "single", borderColor: THEME2.border, padding: 1, children: [
|
|
4391
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "row", justifyContent: "space-between", children: [
|
|
4392
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: msg.role === "user" ? THEME2.text : THEME2.accent, children: msg.role === "user" ? "You" : "Agdi" }),
|
|
4393
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: msg.role === "system" ? "System" : "Unknown Model" })
|
|
4394
|
+
] }),
|
|
4341
4395
|
/* @__PURE__ */ jsx(Text, { color: THEME2.text, children: msg.text })
|
|
4342
4396
|
] }, i)) }),
|
|
4343
|
-
/* @__PURE__ */
|
|
4344
|
-
|
|
4345
|
-
{
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4397
|
+
/* @__PURE__ */ jsxs(Box, { borderStyle: "round", borderColor: THEME2.dim, paddingX: 1, marginX: 2, marginBottom: 1, flexDirection: "column", children: [
|
|
4398
|
+
/* @__PURE__ */ jsx(Box, { marginBottom: 1, children: /* @__PURE__ */ jsx(Text, { color: THEME2.dim, italic: true, children: "OpenCode Zen \u2022 Big Pickle \u2022 Variant X-High" }) }),
|
|
4399
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
|
|
4400
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: "> " }),
|
|
4401
|
+
/* @__PURE__ */ jsx(
|
|
4402
|
+
TextInput,
|
|
4403
|
+
{
|
|
4404
|
+
value: query,
|
|
4405
|
+
onChange: setQuery,
|
|
4406
|
+
onSubmit: (val) => {
|
|
4407
|
+
onSend(val);
|
|
4408
|
+
setQuery("");
|
|
4409
|
+
},
|
|
4410
|
+
placeholder
|
|
4411
|
+
}
|
|
4412
|
+
)
|
|
4413
|
+
] }),
|
|
4414
|
+
/* @__PURE__ */ jsxs(Box, { marginTop: 0, justifyContent: "flex-end", flexDirection: "row", children: [
|
|
4415
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: "@ Default agent" }),
|
|
4416
|
+
/* @__PURE__ */ jsx(Spacer, {}),
|
|
4417
|
+
/* @__PURE__ */ jsx(Text, { color: THEME2.dim, children: "\u{1F4CE} \u2794" })
|
|
4418
|
+
] })
|
|
4419
|
+
] })
|
|
4355
4420
|
] });
|
|
4356
4421
|
};
|
|
4357
4422
|
var Dashboard = () => {
|
|
@@ -4451,17 +4516,21 @@ var Dashboard = () => {
|
|
|
4451
4516
|
});
|
|
4452
4517
|
}
|
|
4453
4518
|
};
|
|
4454
|
-
return /* @__PURE__ */ jsxs(Box, { flexDirection: "
|
|
4455
|
-
/* @__PURE__ */ jsx(
|
|
4456
|
-
/* @__PURE__ */
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4519
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", height: 35, width: 120, children: [
|
|
4520
|
+
/* @__PURE__ */ jsx(Header, {}),
|
|
4521
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "row", flexGrow: 1, children: [
|
|
4522
|
+
/* @__PURE__ */ jsx(Sidebar, { history: ["New session - " + (/* @__PURE__ */ new Date()).toLocaleDateString()] }),
|
|
4523
|
+
/* @__PURE__ */ jsx(
|
|
4524
|
+
ChatArea,
|
|
4525
|
+
{
|
|
4526
|
+
history: chatHistory,
|
|
4527
|
+
onSend: handleCommand,
|
|
4528
|
+
placeholder: step === "prompt" ? "Ask Agdi..." : "Reply..."
|
|
4529
|
+
}
|
|
4530
|
+
),
|
|
4531
|
+
/* @__PURE__ */ jsx(ContextPanel, { files: activeFiles, agentStatus })
|
|
4532
|
+
] }),
|
|
4533
|
+
/* @__PURE__ */ jsx(Footer, { status: agentStatus })
|
|
4465
4534
|
] });
|
|
4466
4535
|
};
|
|
4467
4536
|
var App = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agdi",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.5",
|
|
4
4
|
"description": "AI-powered app generator - build full-stack apps from natural language in your terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -90,4 +90,4 @@
|
|
|
90
90
|
"ts-node": "^10.9.2",
|
|
91
91
|
"uuid": "^13.0.0"
|
|
92
92
|
}
|
|
93
|
-
}
|
|
93
|
+
}
|