From 859939a6d449ffbf202ad274dc944711625b61f4 Mon Sep 17 00:00:00 2001 From: hetaoBackend Date: Thu, 1 Oct 2026 22:00:26 +0800 Subject: [PATCH] feat: sync and release MiniMax Code 0.6.1 Allow /doctor and /feedback in a /btw side conversation so a failed side response can be diagnosed or reported without leaving it. Neither command mutates the parent or side Session. /quit stays blocked in the side view, because leaving from there aborts only the side Turn and skips side Session cleanup. Bump the root and TUI source versions to 0.6.1. --- docs/tui-capabilities.md | 2 + package.json | 2 +- packages/tui/package.json | 2 +- packages/tui/src/tui/commands/catalog.ts | 4 ++ .../test/unit/tui/commands/catalog.test.ts | 53 +++++++++++++++++++ release/public-source.json | 1 + test/vitest-suites.json | 1 + 7 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 packages/tui/test/unit/tui/commands/catalog.test.ts diff --git a/docs/tui-capabilities.md b/docs/tui-capabilities.md index f2e7556a2..d53994af7 100644 --- a/docs/tui-capabilities.md +++ b/docs/tui-capabilities.md @@ -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 diff --git a/package.json b/package.json index cde6d38ab..3bb08349e 100644 --- a/package.json +++ b/package.json @@ -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.", diff --git a/packages/tui/package.json b/packages/tui/package.json index 1b551528a..bdb3bdbed 100644 --- a/packages/tui/package.json +++ b/packages/tui/package.json @@ -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", diff --git a/packages/tui/src/tui/commands/catalog.ts b/packages/tui/src/tui/commands/catalog.ts index 42c621a76..a843f0df4 100644 --- a/packages/tui/src/tui/commands/catalog.ts +++ b/packages/tui/src/tui/commands/catalog.ts @@ -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', @@ -49,6 +51,8 @@ export const SIDE_MODE_COMMANDS = new Set([ 'copy', 'parent', 'retry', + 'doctor', + 'feedback', ]); export interface TuiCommand { diff --git a/packages/tui/test/unit/tui/commands/catalog.test.ts b/packages/tui/test/unit/tui/commands/catalog.test.ts new file mode 100644 index 000000000..be04a9a28 --- /dev/null +++ b/packages/tui/test/unit/tui/commands/catalog.test.ts @@ -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(); + }); +}); diff --git a/release/public-source.json b/release/public-source.json index 627339727..a02b4a037 100644 --- a/release/public-source.json +++ b/release/public-source.json @@ -3363,6 +3363,7 @@ "packages/tui/test/unit/tui-transcript-presentation.test.ts", "packages/tui/test/unit/tui-transcript-view.test.ts", "packages/tui/test/unit/tui-workspace-status-line.test.ts", + "packages/tui/test/unit/tui/commands/catalog.test.ts", "packages/tui/test/unit/tui/controller/interaction/input-flow.test.ts", "packages/tui/test/unit/tui/controller/product/chrome-flow.test.ts", "packages/tui/test/unit/tui/controller/product/command-flow.test.ts", diff --git a/test/vitest-suites.json b/test/vitest-suites.json index 740c39def..c2725b19a 100644 --- a/test/vitest-suites.json +++ b/test/vitest-suites.json @@ -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",