mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 02:07:26 +00:00
fix(ci): align strict nullable typing across channels and ui
This commit is contained in:
@@ -110,10 +110,11 @@ describe("form-utils preserves numeric types", () => {
|
||||
const raw = serializeConfigForm(form);
|
||||
const parsed = JSON.parse(raw);
|
||||
const model = parsed.models.providers.xai.models[0] as Record<string, unknown>;
|
||||
const cost = model.cost as Record<string, unknown>;
|
||||
|
||||
expectNumericModelCore(model);
|
||||
expect(typeof model.cost.input).toBe("number");
|
||||
expect(model.cost.input).toBe(0.5);
|
||||
expect(typeof cost.input).toBe("number");
|
||||
expect(cost.input).toBe(0.5);
|
||||
});
|
||||
|
||||
it("cloneConfigObject + setPathValue preserves unrelated numeric fields", () => {
|
||||
|
||||
@@ -218,10 +218,10 @@ function renderTokenRow(deviceId: string, token: DeviceTokenSummary, props: Node
|
||||
|
||||
type BindingAgent = {
|
||||
id: string;
|
||||
name?: string;
|
||||
name: string | undefined;
|
||||
index: number;
|
||||
isDefault: boolean;
|
||||
binding?: string | null;
|
||||
binding: string | null;
|
||||
};
|
||||
|
||||
type BindingNode = NodeTargetOption;
|
||||
|
||||
@@ -28,6 +28,10 @@ const baseUsage = {
|
||||
output: 400,
|
||||
cacheRead: 200,
|
||||
cacheWrite: 100,
|
||||
inputCost: 0.3,
|
||||
outputCost: 0.4,
|
||||
cacheReadCost: 0.2,
|
||||
cacheWriteCost: 0.1,
|
||||
durationMs: 60000,
|
||||
firstActivity: 0,
|
||||
lastActivity: 60000,
|
||||
|
||||
Reference in New Issue
Block a user