Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/tui-capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ remain hidden from `/sessions` and `/resume`.
When a side-conversation model request fails and can be retried, run `/retry`
in the side view to resend the side conversation's last message without
returning to the main view.
`/doctor` and `/feedback` also work in the side view, so a failed side response
can be diagnosed or reported without leaving it. `/quit` stays unavailable there.

Creation and activation failures record a bounded, redacted cause chain in the
local `session.side.failed` diagnostic event. Feedback uploads still apply the
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minimax-code",
"version": "0.6.0",
"version": "0.6.1",
"private": true,
"type": "module",
"description": "Standalone MiniMax Code TUI with managed accounts, BYOK models, cloud tools, plugins and ACP.",
Expand Down
2 changes: 1 addition & 1 deletion packages/tui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@minimax/code",
"version": "0.6.0",
"version": "0.6.1",
"private": true,
"description": "Minimax Code CLI and TUI product entry.",
"type": "module",
Expand Down
4 changes: 4 additions & 0 deletions packages/tui/src/tui/commands/catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export interface TuiCommandContext {
* conversation" command; it mirrors the Ctrl+/ toggle, not a close.
* `/retry` stays available because it only resends the side Session's own
* failed message, and a failed side response tells the user to run it.
* `/doctor` and `/feedback` stay available so a failed side response can be
* diagnosed and reported where it happened; neither mutates either Session.
*/
export const SIDE_MODE_COMMANDS = new Set([
'help',
Expand All @@ -49,6 +51,8 @@ export const SIDE_MODE_COMMANDS = new Set([
'copy',
'parent',
'retry',
'doctor',
'feedback',
]);

export interface TuiCommand {
Expand Down
53 changes: 53 additions & 0 deletions packages/tui/test/unit/tui/commands/catalog.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { describe, expect, it, vi } from "vitest";
import {
createTuiCommandCatalog,
type TuiCommandContext,
} from "../../../../src/tui/commands/catalog.js";

describe("MiniMax Code TUI command catalog in side conversations", () => {
const sideContext: TuiCommandContext = {
hasSession: true,
hasParentSession: true,
managedTokenPresent: true,
queueEnabled: true,
hasLiveRun: false,
hasPendingInteraction: false,
queuedCount: 0,
canRetry: false,
sideMode: true,
};

it("lets a side conversation run diagnostics and send feedback in place", async () => {
const doctorHandler = vi.fn();
const feedbackHandler = vi.fn();
const quitHandler = vi.fn();
const catalog = createTuiCommandCatalog(
[],
{ doctor: doctorHandler, feedback: feedbackHandler, quit: quitHandler },
() => sideContext,
);

await expect(catalog.dispatch("/doctor")).resolves.toMatchObject({ status: "handled" });
await expect(catalog.dispatch("/feedback side reply failed")).resolves.toMatchObject({
status: "handled",
});
expect(doctorHandler).toHaveBeenCalledOnce();
expect(feedbackHandler).toHaveBeenCalledOnce();

// /quit stays blocked: leaving from the side view would abort only the
// side Turn and skip side cleanup, unlike quitting from the main view.
await expect(catalog.dispatch("/quit")).resolves.toMatchObject({ status: "unavailable" });
expect(quitHandler).not.toHaveBeenCalled();
});

it("keeps commands that mutate Sessions unavailable in a side conversation", async () => {
const sessionsHandler = vi.fn();
const catalog = createTuiCommandCatalog([], { sessions: sessionsHandler }, () => sideContext);

await expect(catalog.dispatch("/sessions")).resolves.toMatchObject({
status: "unavailable",
reason: expect.stringContaining("unavailable in side conversations"),
});
expect(sessionsHandler).not.toHaveBeenCalled();
});
});
1 change: 1 addition & 0 deletions release/public-source.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test/vitest-suites.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
"packages/local-runtime-v2/test/unit/compat/v1/runtime.test.ts",
"packages/tui/test/unit/runtime-product-access.test.ts",
"packages/tui/test/unit/tui-app.test.ts",
"packages/tui/test/unit/tui/commands/catalog.test.ts",
"packages/tui/test/unit/tui-goal-banner.test.ts",
"packages/tui/test/unit/tui-model-picker.test.ts",
"packages/tui/test/unit/tui/controller/interaction/input-flow.test.ts",
Expand Down
Loading