惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
Apple Machine Learning Research
Apple Machine Learning Research
H
Help Net Security
雷峰网
雷峰网
V
Visual Studio Blog
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
Hugging Face - Blog
Hugging Face - Blog
爱范儿
爱范儿
IT之家
IT之家
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
月光博客
月光博客
A
About on SuperTechFans
B
Blog RSS Feed
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The GitHub Blog
The GitHub Blog
N
Netflix TechBlog - Medium
J
Java Code Geeks
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(ui): scope chat session picker to active agent (#8596...
serkonyc · 2026-05-25 · via Recent Commits to openclaw:main

@@ -205,6 +205,9 @@ function openChatSessionPicker(state: AppViewState, surface: ChatSessionSelectSu

205205

state.chatSessionPickerOpen = true;

206206

state.chatSessionPickerSurface = surface;

207207

state.chatSessionPickerError = null;

208+

if (!state.chatSessionPickerResult && !state.chatSessionPickerAppliedQuery) {

209+

void loadChatSessionPickerPage(state);

210+

}

208211

requestHostUpdate(state);

209212

focusChatSessionPickerSearch(state);

210213

}

@@ -216,6 +219,18 @@ function closeChatSessionPicker(state: AppViewState) {

216219

requestHostUpdate(state);

217220

}

218221222+

export function resetChatSessionPickerState(state: AppViewState) {

223+

clearChatSessionPickerSearchTimer(state);

224+

invalidateChatSessionPickerSearchRequests(state);

225+

state.chatSessionPickerOpen = false;

226+

state.chatSessionPickerSurface = null;

227+

state.chatSessionPickerQuery = "";

228+

state.chatSessionPickerAppliedQuery = "";

229+

state.chatSessionPickerLoading = false;

230+

state.chatSessionPickerError = null;

231+

state.chatSessionPickerResult = null;

232+

}

233+219234

function toggleChatSessionPicker(state: AppViewState, surface: ChatSessionSelectSurface) {

220235

if (state.chatSessionPickerOpen && state.chatSessionPickerSurface === surface) {

221236

closeChatSessionPicker(state);

@@ -238,6 +253,20 @@ function createChatSessionPickerRequestParams(

238253

configuredAgentsOnly: overrides.configuredAgentsOnly,

239254

limit: overrides.limit,

240255

};

256+

const activeAgentSession = parseAgentSessionKey(state.sessionKey);

257+

const activeSessionRow = state.sessionsResult?.sessions.find(

258+

(row) => row.key === state.sessionKey,

259+

);

260+

const isGlobalScopeSession =

261+

activeSessionRow?.kind === "global" ||

262+

activeSessionRow?.kind === "unknown" ||

263+

state.sessionKey === "global" ||

264+

state.sessionKey === "unknown";

265+

if (activeAgentSession || !isGlobalScopeSession) {

266+

params.agentId = normalizeAgentId(

267+

activeAgentSession?.agentId ?? state.agentsList?.defaultId ?? "main",

268+

);

269+

}

241270

const offset =

242271

typeof overrides.offset === "number" && Number.isFinite(overrides.offset)

243272

? Math.max(0, Math.floor(overrides.offset))

@@ -361,6 +390,9 @@ function clearChatSessionPickerSearch(state: AppViewState, options: { focus?: bo

361390

state.chatSessionPickerResult = null;

362391

state.chatSessionPickerLoading = false;

363392

requestHostUpdate(state);

393+

if (state.chatSessionPickerOpen) {

394+

void loadChatSessionPickerPage(state);

395+

}

364396

if (options.focus ?? true) {

365397

focusChatSessionPickerSearch(state);

366398

}

@@ -394,7 +426,7 @@ function updateChatSessionPickerSearchQuery(state: AppViewState, nextQuery: stri

394426

}

395427396428

async function loadMoreChatSessionPickerResults(state: AppViewState) {

397-

const result = resolveChatSessionPickerResult(state);

429+

const result = state.chatSessionPickerResult;

398430

const offset = resolveNextChatSessionOffset(result);

399431

if (offset === null) {

400432

return;

@@ -417,12 +449,30 @@ function resolveChatSessionRow(

417449

}

418450419451

function resolveChatSessionPickerResult(state: AppViewState): SessionsListResult | null {

420-

if (state.chatSessionPickerResult || state.chatSessionPickerAppliedQuery) {

452+

if (

453+

state.chatSessionPickerResult ||

454+

state.chatSessionPickerAppliedQuery ||

455+

state.chatSessionPickerOpen

456+

) {

421457

return state.chatSessionPickerResult;

422458

}

423459

return state.sessionsResult;

424460

}

425461462+

function resolveChatSessionPickerRows(

463+

state: AppViewState,

464+

result: SessionsListResult | null,

465+

): { row: SessionsListResult["sessions"][number]; label: string }[] {

466+

const rowsByKey = new Map((result?.sessions ?? []).map((row) => [row.key, row] as const));

467+

return resolveSessionOptionGroups(state, state.sessionKey, result)

468+

.flatMap((group) => group.options)

469+

.filter((option) => rowsByKey.has(option.key))

470+

.map((option) => ({

471+

row: rowsByKey.get(option.key)!,

472+

label: option.label,

473+

}));

474+

}

475+426476

function resolveSelectedChatSessionLabel(

427477

state: AppViewState,

428478

sessionGroups: SessionOptionGroup[],

@@ -497,15 +547,15 @@ function renderChatSessionPickerPopover(

497547

pickerId: string,

498548

) {

499549

const result = resolveChatSessionPickerResult(state);

500-

const rows = result?.sessions ?? [];

550+

const pickerRows = resolveChatSessionPickerRows(state, result);

501551

const controlsDisabled = !state.connected || !state.client;

502552

const normalizedQuery = normalizeOptionalString(state.chatSessionPickerQuery) ?? "";

503553

const searchPending = normalizedQuery !== state.chatSessionPickerAppliedQuery;

504554

const loadMoreDisabled = controlsDisabled || state.chatSessionPickerLoading || searchPending;

505555

const hasQuery =

506556

state.chatSessionPickerQuery.trim() !== "" || state.chatSessionPickerAppliedQuery.trim() !== "";

507557

const loadMoreOffset = resolveNextChatSessionOffset(result);

508-

const shownCount = rows.length;

558+

const shownCount = pickerRows.length;

509559

const totalCount = result?.totalCount;

510560

const countLabel =

511561

typeof totalCount === "number" && Number.isFinite(totalCount)

@@ -578,17 +628,17 @@ function renderChatSessionPickerPopover(

578628

</div>`

579629

: ""}

580630

<div class="chat-session-picker__list" role="listbox">

581-

${state.chatSessionPickerLoading && rows.length === 0

631+

${state.chatSessionPickerLoading && pickerRows.length === 0

582632

? html`<div class="chat-session-picker__status">${t("common.loading")}</div>`

583633

: ""}

584-

${!state.chatSessionPickerLoading && rows.length === 0

634+

${!state.chatSessionPickerLoading && pickerRows.length === 0

585635

? html`<div class="chat-session-picker__status">${t("sessionsView.noSessions")}</div>`

586636

: ""}

587637

${repeat(

588-

rows,

589-

(row) => row.key,

590-

(row) => {

591-

const label = resolveSessionDisplayName(row.key, row);

638+

pickerRows,

639+

(entry) => entry.row.key,

640+

(entry) => {

641+

const { row, label } = entry;

592642

const meta = formatChatSessionPickerMeta(row);

593643

const selected = row.key === state.sessionKey;

594644

return html`