@menteeai/menteeswe 0.1.22 → 0.1.23
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 +123 -121
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1306,7 +1306,7 @@ var init_loop = __esm({
|
|
|
1306
1306
|
var version;
|
|
1307
1307
|
var init_package = __esm({
|
|
1308
1308
|
"package.json"() {
|
|
1309
|
-
version = "0.1.
|
|
1309
|
+
version = "0.1.23";
|
|
1310
1310
|
}
|
|
1311
1311
|
});
|
|
1312
1312
|
|
|
@@ -1640,10 +1640,16 @@ var App_exports = {};
|
|
|
1640
1640
|
__export(App_exports, {
|
|
1641
1641
|
App: () => App
|
|
1642
1642
|
});
|
|
1643
|
-
import {
|
|
1643
|
+
import { useEffect as useEffect2, useMemo as useMemo2, useRef, useState as useState3 } from "react";
|
|
1644
1644
|
import { Box as Box6, Static, Text as Text6, useApp, useInput as useInput4, useStdout } from "ink";
|
|
1645
1645
|
import TextInput2 from "ink-text-input";
|
|
1646
|
-
import {
|
|
1646
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1647
|
+
function TaskBlock({ text }) {
|
|
1648
|
+
return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 1, children: [
|
|
1649
|
+
/* @__PURE__ */ jsx6(Text6, { color: "magenta", bold: true, children: "\u25B8 Task" }),
|
|
1650
|
+
/* @__PURE__ */ jsx6(Text6, { children: text })
|
|
1651
|
+
] });
|
|
1652
|
+
}
|
|
1647
1653
|
function App(props) {
|
|
1648
1654
|
const { exit } = useApp();
|
|
1649
1655
|
const { stdout } = useStdout();
|
|
@@ -1681,13 +1687,19 @@ function App(props) {
|
|
|
1681
1687
|
const stateRef = useRef({ running, approval, dialog, factoryResult, providerName, model });
|
|
1682
1688
|
stateRef.current = { running, approval, dialog, factoryResult, providerName, model };
|
|
1683
1689
|
const abortRef = useRef(null);
|
|
1690
|
+
const showDetailsRef = useRef(showDetails);
|
|
1691
|
+
showDetailsRef.current = showDetails;
|
|
1692
|
+
const showEditsRef = useRef(showEdits);
|
|
1693
|
+
showEditsRef.current = showEdits;
|
|
1684
1694
|
const appendLog = (text, noise = false, kind) => {
|
|
1685
1695
|
if (!text) return;
|
|
1696
|
+
if (noise && !showDetailsRef.current) return;
|
|
1686
1697
|
counter.current += 1;
|
|
1687
1698
|
const line = { id: counter.current, text, noise, kind };
|
|
1688
1699
|
setLog((prev) => [...prev, line]);
|
|
1689
1700
|
};
|
|
1690
1701
|
const appendPatchEdit = (edit) => {
|
|
1702
|
+
if (!showEditsRef.current) return;
|
|
1691
1703
|
counter.current += 1;
|
|
1692
1704
|
setLog((prev) => [...prev, { id: counter.current, text: "", noise: false, kind: "patch", edit }]);
|
|
1693
1705
|
};
|
|
@@ -1731,6 +1743,10 @@ function App(props) {
|
|
|
1731
1743
|
}
|
|
1732
1744
|
return;
|
|
1733
1745
|
}
|
|
1746
|
+
if (event.type === "task_started") {
|
|
1747
|
+
appendLog(event.message ?? "", false, "task");
|
|
1748
|
+
return;
|
|
1749
|
+
}
|
|
1734
1750
|
appendLog(formatEvent(event), TOOL_NOISE.has(event.type));
|
|
1735
1751
|
if (event.type === "tool_started") {
|
|
1736
1752
|
const name = typeof event.data?.tool === "string" ? event.data.tool : "";
|
|
@@ -2026,118 +2042,116 @@ function App(props) {
|
|
|
2026
2042
|
const cols = stdout.columns || 80;
|
|
2027
2043
|
const marquee = thinkingText.slice(-Math.max(1, cols - 4));
|
|
2028
2044
|
return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
|
|
2029
|
-
/* @__PURE__ */ jsx6(Static, { items: [{ key: "header", text: header }], children: (item) => /* @__PURE__ */ jsx6(Box6, { children: item.text }, item.key) }),
|
|
2030
|
-
/* @__PURE__ */
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
{
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2045
|
+
/* @__PURE__ */ jsx6(Static, { items: [{ key: "header", text: header }], children: (item) => /* @__PURE__ */ jsx6(Box6, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 1, children: /* @__PURE__ */ jsx6(Text6, { children: item.text }) }, item.key) }),
|
|
2046
|
+
/* @__PURE__ */ jsx6(Static, { items: log, children: (line) => line.kind === "answer" ? /* @__PURE__ */ jsx6(AnswerBlock, { text: line.text }, line.id) : line.kind === "task" ? /* @__PURE__ */ jsx6(TaskBlock, { text: line.text }, line.id) : line.kind === "patch" && line.edit ? /* @__PURE__ */ jsx6(CurrentEditBox, { edit: line.edit }, line.id) : /* @__PURE__ */ jsx6(Text6, { children: line.text }, line.id) }),
|
|
2047
|
+
finalPending !== null ? /* @__PURE__ */ jsx6(Box6, { marginTop: 1, flexDirection: "column", borderStyle: "round", borderColor: "green", paddingX: 1, children: /* @__PURE__ */ jsxs6(Text6, { color: "green", children: [
|
|
2048
|
+
typedText,
|
|
2049
|
+
typing ? "\u258C" : ""
|
|
2050
|
+
] }) }) : null,
|
|
2051
|
+
taskSummary ? /* @__PURE__ */ jsx6(Box6, { marginTop: 1, children: /* @__PURE__ */ jsx6(Text6, { children: taskSummary }) }) : null,
|
|
2052
|
+
detailsOpen && inspectorIndex !== null && toolHistory[inspectorIndex] ? (() => {
|
|
2053
|
+
const rec = toolHistory[inspectorIndex];
|
|
2054
|
+
const outLines = rec.output.split("\n").slice(0, 24).join("\n");
|
|
2055
|
+
return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", marginTop: 1, borderStyle: "round", borderColor: "gray", paddingX: 1, children: [
|
|
2056
|
+
/* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
|
|
2057
|
+
" tool details (",
|
|
2058
|
+
inspectorIndex + 1,
|
|
2059
|
+
"/",
|
|
2060
|
+
toolHistory.length,
|
|
2061
|
+
") \xB7 Alt+D to cycle "
|
|
2062
|
+
] }),
|
|
2063
|
+
/* @__PURE__ */ jsxs6(Text6, { color: toolColorName(rec.name), bold: true, children: [
|
|
2064
|
+
rec.name,
|
|
2065
|
+
" ",
|
|
2066
|
+
rec.target
|
|
2067
|
+
] }),
|
|
2068
|
+
/* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
|
|
2069
|
+
"args: ",
|
|
2070
|
+
rec.args.slice(0, 400) || "(none)"
|
|
2071
|
+
] }),
|
|
2072
|
+
/* @__PURE__ */ jsx6(Text6, { dimColor: true, children: outLines || "(no output)" })
|
|
2073
|
+
] });
|
|
2074
|
+
})() : null,
|
|
2075
|
+
dialog?.kind === "model" ? /* @__PURE__ */ jsx6(
|
|
2076
|
+
SelectDialog,
|
|
2077
|
+
{
|
|
2078
|
+
title: `Model \u2014 ${providerName}`,
|
|
2079
|
+
items: modelItems,
|
|
2080
|
+
loading: modelLoading,
|
|
2081
|
+
error: modelError,
|
|
2082
|
+
current: model ?? factoryResult.provider?.defaultModel,
|
|
2083
|
+
onSelect: (id) => {
|
|
2084
|
+
setDialog(null);
|
|
2085
|
+
setModelAndPersist(id);
|
|
2086
|
+
},
|
|
2087
|
+
onClose: () => setDialog(null)
|
|
2088
|
+
}
|
|
2089
|
+
) : dialog?.kind === "provider" ? /* @__PURE__ */ jsx6(
|
|
2090
|
+
SelectDialog,
|
|
2091
|
+
{
|
|
2092
|
+
title: "Provider",
|
|
2093
|
+
items: PROVIDER_NAMES,
|
|
2094
|
+
descriptions: PROVIDER_DESCRIPTIONS,
|
|
2095
|
+
current: providerName,
|
|
2096
|
+
onSelect: (name) => {
|
|
2097
|
+
setDialog(null);
|
|
2098
|
+
switchProvider(name);
|
|
2099
|
+
},
|
|
2100
|
+
onClose: () => setDialog(null)
|
|
2101
|
+
}
|
|
2102
|
+
) : dialog?.kind === "key" ? /* @__PURE__ */ jsx6(
|
|
2103
|
+
KeyDialog,
|
|
2104
|
+
{
|
|
2105
|
+
providerName,
|
|
2106
|
+
onSubmit: (value) => {
|
|
2107
|
+
setDialog(null);
|
|
2108
|
+
saveKey(value);
|
|
2109
|
+
},
|
|
2110
|
+
onClose: () => setDialog(null)
|
|
2111
|
+
}
|
|
2112
|
+
) : approval ? /* @__PURE__ */ jsx6(
|
|
2113
|
+
ApprovalPrompt,
|
|
2114
|
+
{
|
|
2115
|
+
request: approval,
|
|
2116
|
+
onDecision: (decision) => {
|
|
2117
|
+
bridge.resolve(decision);
|
|
2118
|
+
if (decision === "always") bus.emit("info", "Approved for the rest of this session.");
|
|
2096
2119
|
}
|
|
2097
|
-
|
|
2098
|
-
|
|
2120
|
+
}
|
|
2121
|
+
) : running ? /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
|
|
2122
|
+
/* @__PURE__ */ jsxs6(Box6, { children: [
|
|
2123
|
+
/* @__PURE__ */ jsxs6(Text6, { color: "yellow", children: [
|
|
2124
|
+
SPINNER_FRAMES[frame],
|
|
2125
|
+
" "
|
|
2126
|
+
] }),
|
|
2127
|
+
/* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
|
|
2128
|
+
"agent ",
|
|
2129
|
+
PHASE_LABEL[phase] ?? "working",
|
|
2130
|
+
"\u2026",
|
|
2131
|
+
tokenTotals.totalIn + tokenTotals.totalOut > 0 ? ` \xB7 ${((tokenTotals.totalIn + tokenTotals.totalOut) / 1e3).toFixed(1)}k tok` : "",
|
|
2132
|
+
" (Ctrl+C to exit)"
|
|
2133
|
+
] })
|
|
2134
|
+
] }),
|
|
2135
|
+
thinkingText ? /* @__PURE__ */ jsxs6(Box6, { children: [
|
|
2136
|
+
/* @__PURE__ */ jsx6(Text6, { color: "cyan", children: "\u{1F4AD} " }),
|
|
2137
|
+
/* @__PURE__ */ jsx6(Text6, { color: "cyan", dimColor: true, children: marquee }),
|
|
2138
|
+
/* @__PURE__ */ jsx6(Text6, { color: "cyan", children: "\u258C" })
|
|
2139
|
+
] }) : null
|
|
2140
|
+
] }) : /* @__PURE__ */ jsxs6(Box6, { children: [
|
|
2141
|
+
/* @__PURE__ */ jsx6(Text6, { color: "cyan", bold: true, children: "\u25B8 " }),
|
|
2142
|
+
/* @__PURE__ */ jsx6(
|
|
2143
|
+
TextInput2,
|
|
2099
2144
|
{
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
}
|
|
2145
|
+
value: taskInput,
|
|
2146
|
+
onChange: setTaskInput,
|
|
2147
|
+
onSubmit: handleSubmit,
|
|
2148
|
+
placeholder: "Describe a task, or /help"
|
|
2105
2149
|
}
|
|
2106
|
-
)
|
|
2107
|
-
/* @__PURE__ */ jsxs6(Box6, { children: [
|
|
2108
|
-
/* @__PURE__ */ jsxs6(Text6, { color: "yellow", children: [
|
|
2109
|
-
SPINNER_FRAMES[frame],
|
|
2110
|
-
" "
|
|
2111
|
-
] }),
|
|
2112
|
-
/* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
|
|
2113
|
-
"agent ",
|
|
2114
|
-
PHASE_LABEL[phase] ?? "working",
|
|
2115
|
-
"\u2026",
|
|
2116
|
-
tokenTotals.totalIn + tokenTotals.totalOut > 0 ? ` \xB7 ${((tokenTotals.totalIn + tokenTotals.totalOut) / 1e3).toFixed(1)}k tok` : "",
|
|
2117
|
-
" (Ctrl+C to exit)"
|
|
2118
|
-
] })
|
|
2119
|
-
] }),
|
|
2120
|
-
thinkingText ? /* @__PURE__ */ jsxs6(Box6, { children: [
|
|
2121
|
-
/* @__PURE__ */ jsx6(Text6, { color: "cyan", children: "\u{1F4AD} " }),
|
|
2122
|
-
/* @__PURE__ */ jsx6(Text6, { color: "cyan", dimColor: true, children: marquee }),
|
|
2123
|
-
/* @__PURE__ */ jsx6(Text6, { color: "cyan", children: "\u258C" })
|
|
2124
|
-
] }) : null
|
|
2125
|
-
] }) : /* @__PURE__ */ jsxs6(Box6, { children: [
|
|
2126
|
-
/* @__PURE__ */ jsx6(Text6, { color: "cyan", bold: true, children: "\u25B8 " }),
|
|
2127
|
-
/* @__PURE__ */ jsx6(
|
|
2128
|
-
TextInput2,
|
|
2129
|
-
{
|
|
2130
|
-
value: taskInput,
|
|
2131
|
-
onChange: setTaskInput,
|
|
2132
|
-
onSubmit: handleSubmit,
|
|
2133
|
-
placeholder: "Describe a task, or /help"
|
|
2134
|
-
}
|
|
2135
|
-
)
|
|
2136
|
-
] })
|
|
2150
|
+
)
|
|
2137
2151
|
] })
|
|
2138
2152
|
] });
|
|
2139
2153
|
}
|
|
2140
|
-
var SPINNER_FRAMES, PHASE_LABEL, PROVIDER_NAMES, PROVIDER_DESCRIPTIONS, BANNER
|
|
2154
|
+
var SPINNER_FRAMES, PHASE_LABEL, PROVIDER_NAMES, PROVIDER_DESCRIPTIONS, BANNER;
|
|
2141
2155
|
var init_App = __esm({
|
|
2142
2156
|
"src/tui/App.tsx"() {
|
|
2143
2157
|
"use strict";
|
|
@@ -2182,18 +2196,6 @@ var init_App = __esm({
|
|
|
2182
2196
|
| |
|
|
2183
2197
|
MenteE SWE \u2014 https://menteeai.org
|
|
2184
2198
|
Twitter: x.com/menteeaiorg`;
|
|
2185
|
-
MAX_RENDERED_LOG_LINES = 400;
|
|
2186
|
-
LogList = memo(function LogList2({
|
|
2187
|
-
log,
|
|
2188
|
-
showDetails,
|
|
2189
|
-
showEdits
|
|
2190
|
-
}) {
|
|
2191
|
-
const visible = log.filter((l) => (showDetails || !l.noise) && (l.kind !== "patch" || showEdits));
|
|
2192
|
-
const windowed = visible.length > MAX_RENDERED_LOG_LINES ? visible.slice(-MAX_RENDERED_LOG_LINES) : visible;
|
|
2193
|
-
return /* @__PURE__ */ jsx6(Fragment, { children: windowed.map(
|
|
2194
|
-
(line) => line.kind === "answer" ? /* @__PURE__ */ jsx6(AnswerBlock, { text: line.text }, line.id) : line.kind === "patch" && line.edit ? /* @__PURE__ */ jsx6(CurrentEditBox, { edit: line.edit }, line.id) : /* @__PURE__ */ jsx6(Text6, { children: line.text }, line.id)
|
|
2195
|
-
) });
|
|
2196
|
-
});
|
|
2197
2199
|
}
|
|
2198
2200
|
});
|
|
2199
2201
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@menteeai/menteeswe",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"description": "MenteE SWE — a model-agnostic autonomous software-engineering agent CLI. Bring your own intelligence: Kimi, GLM/Z.ai, and more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|