miii-agent 0.1.1 → 0.1.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/dist/cli.js +32 -12
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -195,8 +195,8 @@ function ModelList({ models, cursor, activeModel, showActive }) {
|
|
|
195
195
|
"<model>"
|
|
196
196
|
] });
|
|
197
197
|
}
|
|
198
|
-
return /* @__PURE__ */ jsx2(Box2, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 1, children: models.map((m, i) => /* @__PURE__ */ jsxs2(Text2, { color: i === cursor ? "
|
|
199
|
-
i === cursor ? "\
|
|
198
|
+
return /* @__PURE__ */ jsx2(Box2, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 1, children: models.map((m, i) => /* @__PURE__ */ jsxs2(Text2, { color: i === cursor ? "blue" : void 0, dimColor: i !== cursor, children: [
|
|
199
|
+
i === cursor ? "\u276F " : " ",
|
|
200
200
|
m,
|
|
201
201
|
showActive && m === activeModel ? /* @__PURE__ */ jsx2(Text2, { dimColor: true, children: " (active)" }) : null
|
|
202
202
|
] }, m)) });
|
|
@@ -281,16 +281,19 @@ function CommandPalette({ filter, cursor }) {
|
|
|
281
281
|
Box5,
|
|
282
282
|
{
|
|
283
283
|
flexDirection: "column",
|
|
284
|
-
borderStyle: "
|
|
285
|
-
borderColor: "
|
|
284
|
+
borderStyle: "round",
|
|
285
|
+
borderColor: "gray",
|
|
286
286
|
marginX: 1,
|
|
287
287
|
marginBottom: 0,
|
|
288
288
|
paddingX: 1,
|
|
289
289
|
children: [
|
|
290
290
|
filtered.map((cmd, i) => {
|
|
291
291
|
const active = i === cursor;
|
|
292
|
-
return /* @__PURE__ */ jsxs5(Box5, { gap:
|
|
293
|
-
/* @__PURE__ */
|
|
292
|
+
return /* @__PURE__ */ jsxs5(Box5, { gap: 1, children: [
|
|
293
|
+
/* @__PURE__ */ jsxs5(Text5, { bold: active, color: active ? "blue" : void 0, dimColor: !active, children: [
|
|
294
|
+
active ? "\u276F " : " ",
|
|
295
|
+
cmd.name
|
|
296
|
+
] }),
|
|
294
297
|
/* @__PURE__ */ jsx5(Text5, { dimColor: true, children: cmd.description })
|
|
295
298
|
] }, cmd.name);
|
|
296
299
|
}),
|
|
@@ -364,16 +367,16 @@ function FilePicker({ matches, cursor }) {
|
|
|
364
367
|
Box6,
|
|
365
368
|
{
|
|
366
369
|
flexDirection: "column",
|
|
367
|
-
borderStyle: "
|
|
368
|
-
borderColor: "
|
|
370
|
+
borderStyle: "round",
|
|
371
|
+
borderColor: "gray",
|
|
369
372
|
marginX: 1,
|
|
370
373
|
marginBottom: 0,
|
|
371
374
|
paddingX: 1,
|
|
372
375
|
children: [
|
|
373
376
|
matches.map((f, i) => {
|
|
374
377
|
const active = i === cursor;
|
|
375
|
-
return /* @__PURE__ */ jsx6(Box6, { children: /* @__PURE__ */ jsxs6(Text6, { bold: active, color: active ? "
|
|
376
|
-
active ? "\
|
|
378
|
+
return /* @__PURE__ */ jsx6(Box6, { children: /* @__PURE__ */ jsxs6(Text6, { bold: active, color: active ? "blue" : void 0, dimColor: !active, children: [
|
|
379
|
+
active ? "\u276F " : " ",
|
|
377
380
|
f
|
|
378
381
|
] }) }, f);
|
|
379
382
|
}),
|
|
@@ -432,6 +435,14 @@ function ThinkingBlock({ content }) {
|
|
|
432
435
|
] });
|
|
433
436
|
}
|
|
434
437
|
|
|
438
|
+
// src/ui/constants.ts
|
|
439
|
+
var EMPTY_STATE_HINTS = [
|
|
440
|
+
"\u2022 explain @file \u2014 reference a file with @",
|
|
441
|
+
"\u2022 /models \u2014 switch model or effort",
|
|
442
|
+
"\u2022 ctrl+t \u2014 toggle thinking \xB7 esc \u2014 cancel"
|
|
443
|
+
];
|
|
444
|
+
var EMPTY_STATE_TITLE = "Ask anything, or try:";
|
|
445
|
+
|
|
435
446
|
// src/ui/ChatView.tsx
|
|
436
447
|
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
437
448
|
function formatTokens(n) {
|
|
@@ -642,16 +653,17 @@ function summarizeInput(input) {
|
|
|
642
653
|
return "";
|
|
643
654
|
}
|
|
644
655
|
function PermissionPrompt({ req, cursor }) {
|
|
656
|
+
const label = TOOL_LABEL[req.toolName] ?? req.toolName;
|
|
645
657
|
const options = [
|
|
646
658
|
{ label: "Yes", key: "yes" },
|
|
647
|
-
{ label: "No
|
|
659
|
+
{ label: "No", key: "no" }
|
|
648
660
|
];
|
|
649
661
|
const summary = summarizeInput(req.input);
|
|
650
662
|
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", marginBottom: 1, borderStyle: "round", borderColor: "blue", paddingX: 1, children: [
|
|
651
663
|
/* @__PURE__ */ jsx8(Text8, { color: "blue", bold: true, children: "Tool use" }),
|
|
652
664
|
/* @__PURE__ */ jsx8(Box8, { marginTop: 1, children: /* @__PURE__ */ jsxs8(Text8, { children: [
|
|
653
665
|
"Allow ",
|
|
654
|
-
/* @__PURE__ */ jsx8(Text8, { bold: true, children:
|
|
666
|
+
/* @__PURE__ */ jsx8(Text8, { bold: true, children: label }),
|
|
655
667
|
"?"
|
|
656
668
|
] }) }),
|
|
657
669
|
summary && /* @__PURE__ */ jsx8(Box8, { marginLeft: 2, children: /* @__PURE__ */ jsx8(Text8, { dimColor: true, children: summary }) }),
|
|
@@ -675,7 +687,15 @@ function ChatView({
|
|
|
675
687
|
activeToolUses,
|
|
676
688
|
activeToolResults
|
|
677
689
|
}) {
|
|
690
|
+
const empty = messages.length === 0 && !streaming && !thinking && !pendingPermission && !error;
|
|
678
691
|
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", marginLeft: 1, marginBottom: 1, children: [
|
|
692
|
+
empty && /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", marginBottom: 1, children: [
|
|
693
|
+
/* @__PURE__ */ jsx8(Text8, { dimColor: true, children: EMPTY_STATE_TITLE }),
|
|
694
|
+
EMPTY_STATE_HINTS.map((h, i) => /* @__PURE__ */ jsxs8(Text8, { dimColor: true, children: [
|
|
695
|
+
" ",
|
|
696
|
+
h
|
|
697
|
+
] }, i))
|
|
698
|
+
] }),
|
|
679
699
|
messages.map(
|
|
680
700
|
(msg, i) => msg.role === "user" ? /* @__PURE__ */ jsxs8(Box8, { flexDirection: "row", marginBottom: 1, children: [
|
|
681
701
|
/* @__PURE__ */ jsx8(Text8, { color: "blue", children: "\u25CF " }),
|