flavor-code 1.4.0-beta.10 → 1.4.0-beta.12
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 +4 -1
- package/README.zh-CN.md +4 -1
- package/dist/{app-SMIB6P23.js → app-F44LTVBV.js} +509 -133
- package/dist/{chunk-EXOSMO57.js → chunk-7YFHRORG.js} +2 -3
- package/dist/{chunk-BYHO2CA5.js → chunk-AOOVLNX4.js} +8 -6
- package/dist/{chunk-UO4DLWU5.js → chunk-G7CY3S5B.js} +1 -1
- package/dist/{chunk-XMRKRPNC.js → chunk-VMQWXQEC.js} +2 -1
- package/dist/{claude-ink-6EZHF64C.js → claude-ink-JZXNSAQS.js} +1 -1
- package/dist/cli-main.js +6 -6
- package/dist/config/schema.d.ts +2 -0
- package/dist/desktop/main.js +9 -8
- package/dist/desktop-renderer/assets/index-BM9ugkh9.js +154 -0
- package/dist/desktop-renderer/assets/{interactive-terminal-DestMQ2z.js → interactive-terminal-1agnYY5L.js} +1 -1
- package/dist/desktop-renderer/index.html +1 -1
- package/dist/{load-EW56Q2MM.js → load-UPOG3XQR.js} +1 -1
- package/dist/models/openai.d.ts +4 -2
- package/dist/sdk/index.js +3 -3
- package/package.json +1 -1
- package/dist/desktop-renderer/assets/index-RNe5Gtum.js +0 -154
|
@@ -38,9 +38,8 @@ var ProviderConfigSchema = z.object({
|
|
|
38
38
|
// parameter. Provider thinking deltas are forwarded whenever they arrive.
|
|
39
39
|
thinkingBudget: z.number().int().min(0).optional(),
|
|
40
40
|
// Reasoning effort requested from the OpenAI Responses protocol (sent as
|
|
41
|
-
// reasoning.effort).
|
|
42
|
-
|
|
43
|
-
thinkingEffort: z.enum(["minimal", "low", "medium", "high", "xhigh"]).optional(),
|
|
41
|
+
// reasoning.effort). The adapter defaults an omitted value to high.
|
|
42
|
+
thinkingEffort: z.enum(["minimal", "low", "medium", "high", "xhigh", "ultra"]).optional(),
|
|
44
43
|
// Send the Claude Code client fingerprint (User-Agent/x-app) with Anthropic requests,
|
|
45
44
|
// for gateways that restrict the Anthropic protocol to Claude clients.
|
|
46
45
|
claudeClient: z.boolean().optional(),
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
redactConfig,
|
|
24
24
|
setProjectMcpServerDisabled,
|
|
25
25
|
updateProtectedFile
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-7YFHRORG.js";
|
|
27
27
|
import {
|
|
28
28
|
AuditLogger,
|
|
29
29
|
appendUsageLog,
|
|
@@ -1014,10 +1014,11 @@ async function createExampleFlavorConfig(cwd) {
|
|
|
1014
1014
|
pkce: {
|
|
1015
1015
|
type: "oauth-callback",
|
|
1016
1016
|
apiType: "anthropic",
|
|
1017
|
-
authorizationUrl: "http://
|
|
1018
|
-
tokenUrl: "http://
|
|
1017
|
+
authorizationUrl: "http://127.0.0.1:8091/authorize",
|
|
1018
|
+
tokenUrl: "http://127.0.0.1:8091/token",
|
|
1019
1019
|
clientId: "flavor-code-cli",
|
|
1020
|
-
scope: "models:read models:use"
|
|
1020
|
+
scope: "models:read models:use",
|
|
1021
|
+
thinkingEffort: "high"
|
|
1021
1022
|
}
|
|
1022
1023
|
},
|
|
1023
1024
|
agents: {
|
|
@@ -14963,6 +14964,7 @@ function resolveCacheProfile(input) {
|
|
|
14963
14964
|
// src/models/openai.ts
|
|
14964
14965
|
import OpenAI from "openai";
|
|
14965
14966
|
import { readFile as readFile16 } from "fs/promises";
|
|
14967
|
+
var DEFAULT_THINKING_EFFORT = "high";
|
|
14966
14968
|
async function toInput(message2) {
|
|
14967
14969
|
if (message2.role === "tool") {
|
|
14968
14970
|
if (!message2.toolCallId) throw new Error("Tool messages require toolCallId");
|
|
@@ -15038,7 +15040,7 @@ var OpenAIModelAdapter = class {
|
|
|
15038
15040
|
...options.baseURL === void 0 ? {} : { baseURL: options.baseURL }
|
|
15039
15041
|
});
|
|
15040
15042
|
this.debugUsage = options.debugUsage ?? isEnvTruthy(process.env.FLAVOR_DEBUG_USAGE);
|
|
15041
|
-
this.thinkingEffort = options.thinkingEffort;
|
|
15043
|
+
this.thinkingEffort = options.thinkingEffort ?? DEFAULT_THINKING_EFFORT;
|
|
15042
15044
|
}
|
|
15043
15045
|
#logUsage(model, breakdown) {
|
|
15044
15046
|
if (breakdown === void 0) return;
|
|
@@ -15061,7 +15063,7 @@ var OpenAIModelAdapter = class {
|
|
|
15061
15063
|
const body = {
|
|
15062
15064
|
model: request.model,
|
|
15063
15065
|
input: (await Promise.all(request.messages.map(toInput))).flat(),
|
|
15064
|
-
|
|
15066
|
+
reasoning: { effort: this.thinkingEffort },
|
|
15065
15067
|
tools: [...request.tools].sort((a, b) => a.name.localeCompare(b.name)).map((tool) => ({
|
|
15066
15068
|
type: "function",
|
|
15067
15069
|
name: tool.name,
|
|
@@ -19604,7 +19604,7 @@ function renderNodeToOutput(node, output, {
|
|
|
19604
19604
|
const delta = contentCached.y - contentY;
|
|
19605
19605
|
const regionTop = Math.floor(y + contentYoga.getComputedTop());
|
|
19606
19606
|
const regionBottom = regionTop + innerHeight - 1;
|
|
19607
|
-
if (cached?.y === y && cached.height === height && innerHeight > 0 && Math.abs(delta) < innerHeight) {
|
|
19607
|
+
if (cached?.y === y && cached.height === height && innerHeight > 0 && Math.floor(x) === 0 && Math.floor(width) >= output.width && Math.abs(delta) < innerHeight) {
|
|
19608
19608
|
hint = { top: regionTop, bottom: regionBottom, delta };
|
|
19609
19609
|
scrollHint = hint;
|
|
19610
19610
|
} else {
|
|
@@ -21447,6 +21447,7 @@ export {
|
|
|
21447
21447
|
Box_default,
|
|
21448
21448
|
Text,
|
|
21449
21449
|
stripAnsi,
|
|
21450
|
+
stringWidth,
|
|
21450
21451
|
ScrollBox_default,
|
|
21451
21452
|
instances_default,
|
|
21452
21453
|
osc,
|
package/dist/cli-main.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createRequire } from "node:module"; const require = createRequire(impor
|
|
|
3
3
|
import {
|
|
4
4
|
FlavorRpcServer,
|
|
5
5
|
TraceRecorder
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-G7CY3S5B.js";
|
|
7
7
|
import {
|
|
8
8
|
staticTaskLines
|
|
9
9
|
} from "./chunk-RAYH6K2H.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
redactErrorText,
|
|
30
30
|
runDoctor,
|
|
31
31
|
runPalBroker
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-AOOVLNX4.js";
|
|
33
33
|
import {
|
|
34
34
|
MEMORY_RESTART_EXIT_CODE
|
|
35
35
|
} from "./chunk-N5MXHJKD.js";
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
readRecoverableFile,
|
|
42
42
|
setProjectSkillDisabled,
|
|
43
43
|
updateProtectedFile
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-7YFHRORG.js";
|
|
45
45
|
import {
|
|
46
46
|
gt,
|
|
47
47
|
isValidVersion
|
|
@@ -749,7 +749,7 @@ async function runEvaluationFile(path, outputPath) {
|
|
|
749
749
|
})),
|
|
750
750
|
...parsed.maxTokens === void 0 ? {} : { maxTokens: parsed.maxTokens }
|
|
751
751
|
};
|
|
752
|
-
const configured = await import("./load-
|
|
752
|
+
const configured = await import("./load-UPOG3XQR.js").then(({ loadConfig: loadConfig2 }) => loadConfig2({ cwd: workspace, home: process.env.USERPROFILE ?? process.env.HOME ?? workspace }));
|
|
753
753
|
const environment = createExecutionEnvironment(workspace, configured.config.execution) ?? new LocalExecutionEnvironment();
|
|
754
754
|
let report;
|
|
755
755
|
try {
|
|
@@ -919,9 +919,9 @@ async function runInteractiveCli(props) {
|
|
|
919
919
|
const disposeUserTimingSweeper = installUiUserTimingSweeper();
|
|
920
920
|
try {
|
|
921
921
|
const [{ render, AlternateScreen }, { createElement }, { App }] = await Promise.all([
|
|
922
|
-
import("./claude-ink-
|
|
922
|
+
import("./claude-ink-JZXNSAQS.js"),
|
|
923
923
|
import("react"),
|
|
924
|
-
import("./app-
|
|
924
|
+
import("./app-F44LTVBV.js")
|
|
925
925
|
]);
|
|
926
926
|
const instance = await render(createElement(
|
|
927
927
|
AlternateScreen,
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare const ProviderConfigSchema: z.ZodObject<{
|
|
|
25
25
|
low: "low";
|
|
26
26
|
medium: "medium";
|
|
27
27
|
minimal: "minimal";
|
|
28
|
+
ultra: "ultra";
|
|
28
29
|
xhigh: "xhigh";
|
|
29
30
|
}>>;
|
|
30
31
|
claudeClient: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -82,6 +83,7 @@ export declare const FlavorConfigSchema: z.ZodObject<{
|
|
|
82
83
|
low: "low";
|
|
83
84
|
medium: "medium";
|
|
84
85
|
minimal: "minimal";
|
|
86
|
+
ultra: "ultra";
|
|
85
87
|
xhigh: "xhigh";
|
|
86
88
|
}>>;
|
|
87
89
|
claudeClient: z.ZodOptional<z.ZodBoolean>;
|
package/dist/desktop/main.js
CHANGED
|
@@ -214,9 +214,8 @@ var ProviderConfigSchema = z2.object({
|
|
|
214
214
|
// parameter. Provider thinking deltas are forwarded whenever they arrive.
|
|
215
215
|
thinkingBudget: z2.number().int().min(0).optional(),
|
|
216
216
|
// Reasoning effort requested from the OpenAI Responses protocol (sent as
|
|
217
|
-
// reasoning.effort).
|
|
218
|
-
|
|
219
|
-
thinkingEffort: z2.enum(["minimal", "low", "medium", "high", "xhigh"]).optional(),
|
|
217
|
+
// reasoning.effort). The adapter defaults an omitted value to high.
|
|
218
|
+
thinkingEffort: z2.enum(["minimal", "low", "medium", "high", "xhigh", "ultra"]).optional(),
|
|
220
219
|
// Send the Claude Code client fingerprint (User-Agent/x-app) with Anthropic requests,
|
|
221
220
|
// for gateways that restrict the Anthropic protocol to Claude clients.
|
|
222
221
|
claudeClient: z2.boolean().optional(),
|
|
@@ -11619,10 +11618,11 @@ async function createExampleFlavorConfig(cwd) {
|
|
|
11619
11618
|
pkce: {
|
|
11620
11619
|
type: "oauth-callback",
|
|
11621
11620
|
apiType: "anthropic",
|
|
11622
|
-
authorizationUrl: "http://
|
|
11623
|
-
tokenUrl: "http://
|
|
11621
|
+
authorizationUrl: "http://127.0.0.1:8091/authorize",
|
|
11622
|
+
tokenUrl: "http://127.0.0.1:8091/token",
|
|
11624
11623
|
clientId: "flavor-code-cli",
|
|
11625
|
-
scope: "models:read models:use"
|
|
11624
|
+
scope: "models:read models:use",
|
|
11625
|
+
thinkingEffort: "high"
|
|
11626
11626
|
}
|
|
11627
11627
|
},
|
|
11628
11628
|
agents: {
|
|
@@ -14737,6 +14737,7 @@ function resolveCacheProfile(input) {
|
|
|
14737
14737
|
// src/models/openai.ts
|
|
14738
14738
|
import OpenAI from "openai";
|
|
14739
14739
|
import { readFile as readFile16 } from "fs/promises";
|
|
14740
|
+
var DEFAULT_THINKING_EFFORT = "high";
|
|
14740
14741
|
async function toInput(message2) {
|
|
14741
14742
|
if (message2.role === "tool") {
|
|
14742
14743
|
if (!message2.toolCallId) throw new Error("Tool messages require toolCallId");
|
|
@@ -14812,7 +14813,7 @@ var OpenAIModelAdapter = class {
|
|
|
14812
14813
|
...options.baseURL === void 0 ? {} : { baseURL: options.baseURL }
|
|
14813
14814
|
});
|
|
14814
14815
|
this.debugUsage = options.debugUsage ?? isEnvTruthy(process.env.FLAVOR_DEBUG_USAGE);
|
|
14815
|
-
this.thinkingEffort = options.thinkingEffort;
|
|
14816
|
+
this.thinkingEffort = options.thinkingEffort ?? DEFAULT_THINKING_EFFORT;
|
|
14816
14817
|
}
|
|
14817
14818
|
#logUsage(model, breakdown) {
|
|
14818
14819
|
if (breakdown === void 0) return;
|
|
@@ -14835,7 +14836,7 @@ var OpenAIModelAdapter = class {
|
|
|
14835
14836
|
const body = {
|
|
14836
14837
|
model: request.model,
|
|
14837
14838
|
input: (await Promise.all(request.messages.map(toInput))).flat(),
|
|
14838
|
-
|
|
14839
|
+
reasoning: { effort: this.thinkingEffort },
|
|
14839
14840
|
tools: [...request.tools].sort((a, b) => a.name.localeCompare(b.name)).map((tool) => ({
|
|
14840
14841
|
type: "function",
|
|
14841
14842
|
name: tool.name,
|