minicode-ai 0.28.0 → 0.30.0
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/README.md +1 -1
- package/cli/args.ts +93 -70
- package/cli/bootstrap/presentation-bridge.ts +383 -0
- package/cli/commands/acp.ts +7 -1
- package/cli/commands/doctor.ts +7 -3
- package/cli/commands/exec.ts +6 -16
- package/cli/index.ts +3 -2
- package/cli/setup.ts +13 -380
- package/docs/TERMINAL_CONTRACT.md +5 -5
- package/docs/architecture.md +14 -29
- package/package.json +1 -1
- package/src/app/session.ts +25 -2
- package/src/app/tool-layer.ts +27 -0
- package/src/lib/atomic-write.ts +31 -59
- package/src/policy/jail.ts +6 -8
- package/src/providers/anthropic.ts +16 -5
- package/src/providers/responses.ts +37 -7
- package/src/providers/sse-bounds.ts +6 -4
- package/src/session/db/runs.ts +397 -0
- package/src/session/db/schema.ts +358 -0
- package/src/session/persistence.ts +64 -955
- package/src/task/db/schema.ts +325 -0
- package/src/task/db/types.ts +269 -0
- package/src/task/store.ts +74 -986
- package/src/ui/tui/transcript.ts +4 -0
- package/vendor/minicore/src/providers/openai-compat.ts +7 -0
package/src/ui/tui/transcript.ts
CHANGED
|
@@ -675,6 +675,7 @@ export class Transcript {
|
|
|
675
675
|
this.thinkingBuf = ""
|
|
676
676
|
this.thinkingTail = ""
|
|
677
677
|
this.thinkingArea = []
|
|
678
|
+
this.thinkingRowId = null
|
|
678
679
|
this.evicted = 0
|
|
679
680
|
this.hasEvictMarker = false
|
|
680
681
|
this.runningMemo = null
|
|
@@ -1884,6 +1885,9 @@ export class Transcript {
|
|
|
1884
1885
|
if (index < 0) return false
|
|
1885
1886
|
this.lines[index] = line
|
|
1886
1887
|
this.rowCache.delete(id)
|
|
1888
|
+
this.committedProjection = null
|
|
1889
|
+
this.projectedBase = null
|
|
1890
|
+
this.runningMemo = null
|
|
1887
1891
|
return true
|
|
1888
1892
|
}
|
|
1889
1893
|
|
|
@@ -153,6 +153,13 @@ export function createOpenAICompatProvider(config: OpenAICompatConfig): ModelPro
|
|
|
153
153
|
}
|
|
154
154
|
};
|
|
155
155
|
for await (const chunk of sse(response.body, signal)) {
|
|
156
|
+
if (chunk.error && (typeof chunk.error === "object" || typeof chunk.error === "string")) {
|
|
157
|
+
const e = typeof chunk.error === "object" ? (chunk.error as Record<string, unknown>) : { message: String(chunk.error) };
|
|
158
|
+
const msg = String(e.message ?? e.msg ?? JSON.stringify(chunk.error));
|
|
159
|
+
const c = String(e.code ?? e.type ?? "");
|
|
160
|
+
const cat = /auth|401|403/i.test(msg + c) ? "auth" : /rate|quota|429/i.test(msg + c) ? "rate_limit" : /context/i.test(msg) ? "context_length_exceeded" : "server";
|
|
161
|
+
throw new ProviderError(cat, `${cat === "server" ? "server error" : cat}: ${msg}`);
|
|
162
|
+
}
|
|
156
163
|
const usage = chunk.usage as {
|
|
157
164
|
prompt_tokens?: number;
|
|
158
165
|
completion_tokens?: number;
|