Skip to content

Commit eba3623

Browse files
author
lalalune
committed
fix(V-verify-final): biome format fixes on packages/agent to keep verify green
1 parent 20e14e4 commit eba3623

22 files changed

Lines changed: 36 additions & 64 deletions

packages/agent/src/actions/connector-resolver.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,7 @@ export async function findRoomForEntity(
350350
const room = await runtime.getRoom(roomId);
351351
if (!room) continue;
352352
const roomRecord = room as Room & { source?: string };
353-
if (
354-
(roomRecord.source).toLowerCase() ===
355-
platform.toLowerCase()
356-
) {
353+
if (roomRecord.source.toLowerCase() === platform.toLowerCase()) {
357354
return room;
358355
}
359356
}

packages/agent/src/actions/contact.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ async function handleUpdate(
870870
if (explicitName) {
871871
updated.names = [
872872
explicitName,
873-
...(existing.names).filter((n) => n !== explicitName),
873+
...existing.names.filter((n) => n !== explicitName),
874874
];
875875
}
876876

@@ -1008,10 +1008,7 @@ async function handleUpdateContactInfo(
10081008
? readRecord(params.customFields)
10091009
: (params.customFields as Record<string, string> | undefined);
10101010
if (newCustom) {
1011-
const existingCustom = (contact.customFields) as Record<
1012-
string,
1013-
unknown
1014-
>;
1011+
const existingCustom = contact.customFields as Record<string, unknown>;
10151012
if (operation === "add_to") {
10161013
updateData.customFields = { ...existingCustom, ...newCustom };
10171014
} else if (operation === "remove_from") {

packages/agent/src/actions/extract-params.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,7 @@ export async function extractActionParamsViaLlm<
123123
}
124124

125125
const currentMessageText =
126-
typeof message.content.text === "string"
127-
? message.content.text.trim()
128-
: "";
126+
typeof message.content.text === "string" ? message.content.text.trim() : "";
129127
const recentConversation = collectRecentConversation(
130128
state,
131129
recentMessagesLimit,

packages/agent/src/actions/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ async function doReadConfig(params: PluginParams): Promise<ActionResult> {
488488
configured: plugin.configured,
489489
version: plugin.version ?? null,
490490
loadError: plugin.loadError ?? null,
491-
parameters: (plugin.parameters).map((p) => ({
491+
parameters: plugin.parameters.map((p) => ({
492492
key: p.key,
493493
required: p.required ?? false,
494494
sensitive: p.sensitive ?? false,

packages/agent/src/api/chat-routes.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,9 +1215,7 @@ export async function generateChatResponse(
12151215
throw createChatGenerationTimeoutError(generationTimeoutMs);
12161216
}
12171217
try {
1218-
const originalUserText = String(
1219-
extractCompatTextContent(message.content),
1220-
);
1218+
const originalUserText = String(extractCompatTextContent(message.content));
12211219
type StreamSource = "unset" | "callback" | "onStreamChunk";
12221220
let responseText = "";
12231221
let forcedWalletExecutionText = false;

packages/agent/src/api/connector-account-routes.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,8 +937,7 @@ export async function handleConnectorAccountRoutes(
937937
? await readJsonBody<Record<string, unknown>>(req, res)
938938
: undefined;
939939
if (method === "POST" && !body) return true;
940-
const state =
941-
typeof body?.state === "string" ? body.state : (query.state);
940+
const state = typeof body?.state === "string" ? body.state : query.state;
942941
if (!state) {
943942
error(res, "Missing OAuth state", 400);
944943
return true;

packages/agent/src/api/connector-routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export async function handleConnectorRoutes(
224224
}
225225
json(res, {
226226
connectors: redactConfigSecrets(
227-
(state.config.connectors) as Record<string, unknown>,
227+
state.config.connectors as Record<string, unknown>,
228228
),
229229
});
230230
return true;

packages/agent/src/api/inbox-routes.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,7 @@ function extractDiscordReactionEvent(
582582
action: structuredAction,
583583
emoji: structuredEmoji,
584584
targetMessageId,
585-
userKey:
586-
memory.entityId,
585+
userKey: memory.entityId,
587586
userLabel: extractFrom(memory) ?? extractFromUserName(memory),
588587
};
589588
}
@@ -603,8 +602,7 @@ function extractDiscordReactionEvent(
603602
action: legacyMatch[1].toLowerCase() === "added" ? "add" : "remove",
604603
emoji: legacyMatch[2].trim(),
605604
targetMessageId,
606-
userKey:
607-
memory.entityId,
605+
userKey: memory.entityId,
608606
userLabel: extractFrom(memory) ?? extractFromUserName(memory),
609607
};
610608
}

packages/agent/src/api/plugin-discovery-helpers.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ export type { PluginEntry, PluginParamDef } from "./server-types.ts";
6767
import type { PluginEntry, PluginParamDef } from "./server-types.ts";
6868

6969
export function getReleaseBundledPluginIds(): Set<string> {
70-
const packageRoot = findOwnPackageRoot(
71-
import.meta.dirname,
72-
);
70+
const packageRoot = findOwnPackageRoot(import.meta.dirname);
7371
const packageJsonPath = path.join(packageRoot, "package.json");
7472

7573
try {
@@ -988,8 +986,7 @@ export function discoverInstalledPlugins(
988986
* Falls back to filesystem scanning for monorepo development.
989987
*/
990988
export function discoverPluginsFromManifest(): PluginEntry[] {
991-
const thisDir =
992-
import.meta.dirname;
989+
const thisDir = import.meta.dirname;
993990
const packageRoot = findOwnPackageRoot(thisDir);
994991
const manifestRoot = findPluginsManifestRoot(thisDir);
995992
const manifestPath = path.join(manifestRoot, "plugins.json");
@@ -1007,9 +1004,7 @@ export function discoverPluginsFromManifest(): PluginEntry[] {
10071004
.map((p) => {
10081005
const inferredCategory = categorizePlugin(p.id);
10091006
const category =
1010-
inferredCategory === "feature"
1011-
? (p.category)
1012-
: inferredCategory;
1007+
inferredCategory === "feature" ? p.category : inferredCategory;
10131008
const bundledMeta = readBundledPluginPackageMetadata(
10141009
packageRoot,
10151010
p.dirName,

packages/agent/src/api/relationships-routes.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,7 @@ export async function handleRelationshipsRoutes(
315315
});
316316
for (const fact of recentFacts) {
317317
const text =
318-
typeof fact.content.text === "string"
319-
? fact.content.text.trim()
320-
: "";
318+
typeof fact.content.text === "string" ? fact.content.text.trim() : "";
321319
if (!text) {
322320
continue;
323321
}

0 commit comments

Comments
 (0)