mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-21 06:35:07 +00:00
fix(web-shell): settle pin optimism after invalidation
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
f6a2f827fc
commit
65db7cf809
1 changed files with 3 additions and 1 deletions
|
|
@ -3125,6 +3125,7 @@ export function WebShellSidebar({
|
|||
return;
|
||||
}
|
||||
const targetPinned = !session.isPinned;
|
||||
let rpcSucceeded = false;
|
||||
const markRpcSettled = (): void => {
|
||||
setOptimisticPins((previous) => {
|
||||
const entry = previous.get(sessionIdentity);
|
||||
|
|
@ -3174,7 +3175,7 @@ export function WebShellSidebar({
|
|||
isPinned: targetPinned,
|
||||
})
|
||||
.then(() => {
|
||||
markRpcSettled();
|
||||
rpcSucceeded = true;
|
||||
bumpWorkspaceReload();
|
||||
})
|
||||
.catch((err: unknown) => {
|
||||
|
|
@ -3186,6 +3187,7 @@ export function WebShellSidebar({
|
|||
if (workspaceCwd) {
|
||||
sessionCatalogController.invalidateWorkspace(workspaceCwd);
|
||||
}
|
||||
if (rpcSucceeded) markRpcSettled();
|
||||
setSessionBusy(sessionId, false, session.workspaceCwd);
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue