mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-28 20:16:28 +01:00
style: apply oxfmt drift
This commit is contained in:
@@ -359,11 +359,7 @@ describe("loadModelCatalog", () => {
|
||||
|
||||
it("matches models across canonical provider aliases", () => {
|
||||
expect(
|
||||
findModelInCatalog(
|
||||
[{ provider: "z.ai", id: "glm-5", name: "GLM-5" }],
|
||||
"z-ai",
|
||||
"glm-5",
|
||||
),
|
||||
findModelInCatalog([{ provider: "z.ai", id: "glm-5", name: "GLM-5" }], "z-ai", "glm-5"),
|
||||
).toEqual({
|
||||
provider: "z.ai",
|
||||
id: "glm-5",
|
||||
|
||||
@@ -5,8 +5,8 @@ import { join } from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { captureEnv } from "../test-utils/env.js";
|
||||
import { MINIMAX_OAUTH_MARKER, NON_ENV_SECRETREF_MARKER } from "./model-auth-markers.js";
|
||||
import { createProviderAuthResolver } from "./models-config.providers.secrets.js";
|
||||
import { resolveImplicitProvidersForTest } from "./models-config.e2e-harness.js";
|
||||
import { createProviderAuthResolver } from "./models-config.providers.secrets.js";
|
||||
|
||||
describe("models-config provider auth provenance", () => {
|
||||
it("persists env keyRef and tokenRef auth profiles as env var markers", async () => {
|
||||
@@ -125,9 +125,7 @@ describe("models-config provider auth provenance", () => {
|
||||
},
|
||||
);
|
||||
|
||||
expect(
|
||||
auth("openai"),
|
||||
).toEqual({
|
||||
expect(auth("openai")).toEqual({
|
||||
apiKey: "OPENAI_PROFILE_KEY",
|
||||
discoveryApiKey: undefined,
|
||||
mode: "api_key",
|
||||
|
||||
@@ -14,7 +14,6 @@ export function resolveSkillSource(skill: Skill): string {
|
||||
if (sourceInfoSource) {
|
||||
return sourceInfoSource;
|
||||
}
|
||||
const legacySource =
|
||||
typeof compatSkill.source === "string" ? compatSkill.source.trim() : "";
|
||||
const legacySource = typeof compatSkill.source === "string" ? compatSkill.source.trim() : "";
|
||||
return legacySource || "unknown";
|
||||
}
|
||||
|
||||
@@ -40,13 +40,11 @@ function renderExecBody(request: ExecApprovalRequestPayload) {
|
||||
|
||||
function renderPluginBody(active: ExecApprovalRequest) {
|
||||
return html`
|
||||
${
|
||||
active.pluginDescription
|
||||
? html`<pre class="exec-approval-command mono" style="white-space:pre-wrap">
|
||||
${active.pluginDescription
|
||||
? html`<pre class="exec-approval-command mono" style="white-space:pre-wrap">
|
||||
${active.pluginDescription}</pre
|
||||
>`
|
||||
: nothing
|
||||
}
|
||||
: nothing}
|
||||
<div class="exec-approval-meta">
|
||||
${renderMetaRow("Severity", active.pluginSeverity)}
|
||||
${renderMetaRow("Plugin", active.pluginId)} ${renderMetaRow("Agent", active.request.agentId)}
|
||||
@@ -76,18 +74,14 @@ export function renderExecApprovalPrompt(state: AppViewState) {
|
||||
<div class="exec-approval-title">${title}</div>
|
||||
<div class="exec-approval-sub">${remaining}</div>
|
||||
</div>
|
||||
${
|
||||
queueCount > 1
|
||||
? html`<div class="exec-approval-queue">${queueCount} pending</div>`
|
||||
: nothing
|
||||
}
|
||||
${queueCount > 1
|
||||
? html`<div class="exec-approval-queue">${queueCount} pending</div>`
|
||||
: nothing}
|
||||
</div>
|
||||
${isPlugin ? renderPluginBody(active) : renderExecBody(request)}
|
||||
${
|
||||
state.execApprovalError
|
||||
? html`<div class="exec-approval-error">${state.execApprovalError}</div>`
|
||||
: nothing
|
||||
}
|
||||
${state.execApprovalError
|
||||
? html`<div class="exec-approval-error">${state.execApprovalError}</div>`
|
||||
: nothing}
|
||||
<div class="exec-approval-actions">
|
||||
<button
|
||||
class="btn primary"
|
||||
|
||||
Reference in New Issue
Block a user