fix(web): resolve Biome lint and format errors in agent-space.ts

- Format ternary operator on single line per Biome rules
- Replace non-null assertion with proper undefined check

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
claude[bot] 2026-07-24 14:06:58 +00:00
parent f2ffa9ed13
commit c3f58b7139

View file

@ -153,9 +153,7 @@ function legacyGroupIdentity(
containerTag.startsWith("codex_user_") ||
containerTag.startsWith("opencode_user_")
) {
const agent = containerTag.startsWith("codex_user_")
? "Codex"
: "OpenCode"
const agent = containerTag.startsWith("codex_user_") ? "Codex" : "OpenCode"
return {
key: `legacy-personal:${containerTag}`,
label: `Legacy ${agent} personal`,
@ -272,9 +270,12 @@ export function groupAgentSpaces<T extends { containerTag: string }>(
const canonicalMatches = projectName
? (canonicalKeysByName.get(projectName.toLocaleLowerCase()) ?? [])
: []
const firstCanonical = canonicalMatches[0]
const key =
identity.kind === "project" && canonicalMatches.length === 1
? canonicalMatches[0]!
identity.kind === "project" &&
canonicalMatches.length === 1 &&
firstCanonical !== undefined
? firstCanonical
: identity.key
addProjectToGroup(
grouped,