-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(runtimes/external-store): invalidate cache when isRunning changes…
… during autoStatus (#584)
- Loading branch information
Showing
3 changed files
with
7 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@assistant-ui/react": patch | ||
--- | ||
|
||
fix(runtimes/external-store): invalidate cache when isRunning changes during autoStatus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
import { MessageStatus } from "../../types"; | ||
|
||
const AUTO_STATUS_RUNNING = Object.freeze({ type: "running" }); | ||
const AUTO_STATUS_COMPLETE = Object.freeze({ | ||
type: "complete", | ||
reason: "unknown", | ||
}); | ||
|
||
export const isAutoStatus = (status: MessageStatus) => | ||
status === AUTO_STATUS_RUNNING || status === AUTO_STATUS_COMPLETE; | ||
|
||
export const getAutoStatus = (isLast: boolean, isRunning: boolean) => | ||
isLast && isRunning ? AUTO_STATUS_RUNNING : AUTO_STATUS_COMPLETE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters