@ouro.bot/cli 0.1.0-alpha.248 → 0.1.0-alpha.249
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/changelog.json
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
|
|
3
3
|
"versions": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.1.0-alpha.249",
|
|
6
|
+
"changes": [
|
|
7
|
+
"feat(cli): `ouro chat` without agent name shows agent selection (auto-selects if 1 agent, numbered list if multiple).",
|
|
8
|
+
"fix(tui): session history user messages get `) ` prefix, separator line after history, reduced to last 2 exchanges."
|
|
9
|
+
]
|
|
10
|
+
},
|
|
4
11
|
{
|
|
5
12
|
"version": "0.1.0-alpha.248",
|
|
6
13
|
"changes": [
|
|
@@ -1775,8 +1775,36 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
|
|
|
1775
1775
|
return message;
|
|
1776
1776
|
}
|
|
1777
1777
|
if (command.kind === "chat.connect" && deps.startChat) {
|
|
1778
|
+
let agent = command.agent;
|
|
1779
|
+
// No agent specified — show selection
|
|
1780
|
+
/* v8 ignore start -- interactive agent selection: requires real promptInput + discovered agents @preserve */
|
|
1781
|
+
if (!agent) {
|
|
1782
|
+
const discovered = await Promise.resolve(deps.listDiscoveredAgents ? deps.listDiscoveredAgents() : (0, cli_defaults_1.defaultListDiscoveredAgents)());
|
|
1783
|
+
if (discovered.length === 0) {
|
|
1784
|
+
deps.writeStdout("no agents found — run `ouro` to hatch one");
|
|
1785
|
+
return "no agents found";
|
|
1786
|
+
}
|
|
1787
|
+
if (discovered.length === 1) {
|
|
1788
|
+
agent = discovered[0];
|
|
1789
|
+
}
|
|
1790
|
+
else if (deps.promptInput) {
|
|
1791
|
+
const prompt = `who do you want to talk to?\n${discovered.map((a, i) => `${i + 1}. ${a}`).join("\n")}\n`;
|
|
1792
|
+
const answer = await deps.promptInput(prompt);
|
|
1793
|
+
agent = discovered.includes(answer) ? answer : discovered[parseInt(answer, 10) - 1];
|
|
1794
|
+
if (!agent) {
|
|
1795
|
+
deps.writeStdout("invalid selection");
|
|
1796
|
+
return "invalid selection";
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
else {
|
|
1800
|
+
const message = `who do you want to talk to? ${discovered.join(", ")} (use: ouro chat <agent>)`;
|
|
1801
|
+
deps.writeStdout(message);
|
|
1802
|
+
return message;
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
/* v8 ignore stop */
|
|
1778
1806
|
await ensureDaemonRunning(deps);
|
|
1779
|
-
await deps.startChat(
|
|
1807
|
+
await deps.startChat(agent);
|
|
1780
1808
|
return "";
|
|
1781
1809
|
}
|
|
1782
1810
|
if (command.kind === "hatch.start") {
|
|
@@ -742,7 +742,7 @@ function parseOuroCommand(args) {
|
|
|
742
742
|
}
|
|
743
743
|
if (head === "chat") {
|
|
744
744
|
if (!second)
|
|
745
|
-
|
|
745
|
+
return { kind: "chat.connect", agent: "" };
|
|
746
746
|
return { kind: "chat.connect", agent: second };
|
|
747
747
|
}
|
|
748
748
|
if (head === "msg")
|
|
@@ -86,10 +86,13 @@ function MessageBlock({ msg }) {
|
|
|
86
86
|
return ((0, jsx_runtime_1.jsx)(ink_1.Box, { flexDirection: "column", marginTop: 1, children: (0, jsx_runtime_1.jsx)(ink_1.Text, { dimColor: true, children: msg.content }) }));
|
|
87
87
|
}
|
|
88
88
|
if (msg.role === "history-user") {
|
|
89
|
-
return ((0, jsx_runtime_1.jsx)(ink_1.Box, { flexDirection: "column", marginTop: 1, children: (0, jsx_runtime_1.jsx)(ink_1.Text, { dimColor: true, bold: true, children: msg.content }) }));
|
|
89
|
+
return ((0, jsx_runtime_1.jsx)(ink_1.Box, { flexDirection: "column", marginTop: 1, children: (0, jsx_runtime_1.jsxs)(ink_1.Box, { children: [(0, jsx_runtime_1.jsx)(ink_1.Text, { dimColor: true, bold: true, children: ") " }), (0, jsx_runtime_1.jsx)(ink_1.Text, { dimColor: true, bold: true, children: msg.content })] }) }));
|
|
90
90
|
}
|
|
91
91
|
if (msg.role === "history-assistant") {
|
|
92
|
-
return ((0, jsx_runtime_1.jsx)(ink_1.Box, { flexDirection: "column", marginBottom: 1, children: msg.content ? (0, jsx_runtime_1.jsx)(
|
|
92
|
+
return ((0, jsx_runtime_1.jsx)(ink_1.Box, { flexDirection: "column", marginBottom: 1, children: msg.content ? (0, jsx_runtime_1.jsx)(streaming_markdown_1.StreamingMarkdown, { text: msg.content, maxWidth: safeWidth() }) : null }));
|
|
93
|
+
}
|
|
94
|
+
if (msg.role === "history-end") {
|
|
95
|
+
return ((0, jsx_runtime_1.jsx)(ink_1.Box, { flexDirection: "column", children: (0, jsx_runtime_1.jsx)(ink_1.Text, { dimColor: true, children: "─".repeat(safeWidth() + 2) }) }));
|
|
93
96
|
}
|
|
94
97
|
if (msg.role === "user") {
|
|
95
98
|
return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { flexDirection: "column", marginTop: 1, children: [msg.content ? (0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.bone, bold: true, children: msg.content }) : null, (0, jsx_runtime_1.jsx)(ink_1.Box, { marginBottom: 1, children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: "" }) })] }));
|
|
@@ -173,7 +173,7 @@ class TuiStore {
|
|
|
173
173
|
seedHistory(texts) {
|
|
174
174
|
this._inputHistory.push(...texts);
|
|
175
175
|
}
|
|
176
|
-
/** Show session resume context: summary line + last N exchanges,
|
|
176
|
+
/** Show session resume context: summary line + last N exchanges (dimmed), then separator */
|
|
177
177
|
addSessionHistory(summary, exchanges) {
|
|
178
178
|
const msgs = [
|
|
179
179
|
{ id: "history-summary", role: "history-summary", content: summary },
|
|
@@ -182,6 +182,7 @@ class TuiStore {
|
|
|
182
182
|
role: (ex.role === "user" ? "history-user" : "history-assistant"),
|
|
183
183
|
content: ex.content,
|
|
184
184
|
})),
|
|
185
|
+
{ id: "history-end", role: "history-end", content: "" },
|
|
185
186
|
];
|
|
186
187
|
this._completed = [...msgs, ...this._completed];
|
|
187
188
|
this.notify();
|
package/dist/senses/cli.js
CHANGED
|
@@ -539,9 +539,9 @@ async function runCliSession(options) {
|
|
|
539
539
|
/* v8 ignore start -- session resume display: integration-only, tested visually @preserve */
|
|
540
540
|
if (messages.length > 1) {
|
|
541
541
|
const userAssistantMsgs = messages.filter((m) => (m.role === "user" || m.role === "assistant") && typeof m.content === "string" && m.content.trim().length > 0);
|
|
542
|
-
// Extract last
|
|
542
|
+
// Extract last 2 exchanges (up to 4 messages)
|
|
543
543
|
const lastExchanges = [];
|
|
544
|
-
for (let i = userAssistantMsgs.length - 1; i >= 0 && lastExchanges.length <
|
|
544
|
+
for (let i = userAssistantMsgs.length - 1; i >= 0 && lastExchanges.length < 4; i--) {
|
|
545
545
|
lastExchanges.unshift({ role: userAssistantMsgs[i].role, content: userAssistantMsgs[i].content });
|
|
546
546
|
}
|
|
547
547
|
const msgCount = messages.filter(m => m.role === "user" || m.role === "assistant").length;
|