Skip to content

The agent that grows with you

style: eslint --fix on merged TS surfaces

Teknium4e4ee7ee75cc
diff --git a/apps/desktop/src/sdk/index.ts b/apps/desktop/src/sdk/index.ts
index 9b2b80e6f31..1c9cf344aa1 100644
--- a/apps/desktop/src/sdk/index.ts
+++ b/apps/desktop/src/sdk/index.ts
@@ -71,8 +71,8 @@ import {
rememberedSessionProfile,
requestSessionResume,
sessionMatchesStoredId,
- setSessionOwnerHint,
- setResumeExhaustedSessionId
+ setResumeExhaustedSessionId,
+ setSessionOwnerHint
} from '@/store/session'
import {
$focusedRuntimeId,
@@ -135,6 +135,7 @@ const $focusedSessionOwner = computed(
const activeConnectionId = String(
connection?.connectionId || (connection?.mode === 'local' ? 'local' : '')
).trim()
+
const fallback = {
connectionId: activeConnectionId,
profile: normalizeProfileKey(activeProfile)
@@ -158,6 +159,7 @@ const $focusedSessionOwner = computed(
}
const owners = new Map<string, PluginFocusedSessionOwner>()
+
for (const row of sessions.filter(session => sessionMatchesStoredId(session, focused))) {
const connectionId = String(row.connection_id || '').trim()
const profile = normalizeProfileKey(row.profile)
@@ -543,6 +545,7 @@ export const host = {
profile: String(profile.profile || '').trim(),
targetProfile: String(profile.targetProfile || '').trim()
}
+
const name = typeof profile === 'string' ? profile.trim() : route?.profile || ''
if (route && (!route.connectionId || !route.profile || !route.targetProfile)) {
diff --git a/apps/desktop/src/store/session.ts b/apps/desktop/src/store/session.ts
index 421e63e23b0..330d9c57cc2 100644
--- a/apps/desktop/src/store/session.ts
+++ b/apps/desktop/src/store/session.ts
@@ -9,8 +9,8 @@ import { activeConnectionScopeSuffix, rescopeConnectionScopedStores } from '@/li
import { persistBoolean, persistString, storedBoolean, storedString } from '@/lib/storage'
import { syncCronModelImpactConnection } from '@/store/cron-model-impact-scope'
import type { SessionInfo, UsageStats } from '@/types/hermes'
-import type { SessionProfileRoute } from './session-request-router'
+import type { SessionProfileRoute } from './session-request-router'
import { clearUnreadOnOpen } from './session-unread-remote'
type Updater<T> = T | ((current: T) => T)
@@ -615,6 +615,7 @@ function sessionOwnerHintKey(sessionId: string, route: Pick<SessionProfileRoute,
export function setSessionOwnerHint(sessionId: string, route: SessionProfileRoute): void {
const id = sessionId.trim()
+
const normalized = {
...route,
connectionId: route.connectionId.trim(),
@@ -665,6 +666,7 @@ export function getSessionOwnerHint(
return matches.length === 1 ? { ...matches[0].route } : undefined
}
+
// Stored-session id whose resume has EXHAUSTED its bounded auto-retries (the
// terminal-failure latch above kept failing through all MAX_RESUME_RETRIES
// attempts). Distinct from $resumeFailedSessionId, which is armed *during* the
diff --git a/apps/desktop/src/store/transcript-tail.ts b/apps/desktop/src/store/transcript-tail.ts
index c87e615d92e..1016fa2a723 100644
--- a/apps/desktop/src/store/transcript-tail.ts
+++ b/apps/desktop/src/store/transcript-tail.ts
@@ -130,6 +130,7 @@ export function recordTranscriptBackfillPage(
profile?: TranscriptProfileScope
): void {
const current = $transcriptTailBySessionId.get()
+
const selected: Array<[string, TranscriptTailState | undefined]> = profile === undefined
? matchingTailEntries(storedSessionId)
: [[transcriptTailKey(storedSessionId, profile), current[transcriptTailKey(storedSessionId, profile)]]]
@@ -166,6 +167,7 @@ export function transcriptTailState(
export function clearTranscriptTail(storedSessionId: string, profile?: TranscriptProfileScope): void {
const current = $transcriptTailBySessionId.get()
+
const keys = profile === undefined
? matchingTailEntries(storedSessionId).map(([key]) => key)
: [transcriptTailKey(storedSessionId, profile)]