-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(boxai-sidebar): Add cache for Agent Selector
Add missing Flow types and agents prop to mocked cache in tests. Remove unneeded type import.
- Loading branch information
1 parent
e824b98
commit dd84daa
Showing
3 changed files
with
30 additions
and
2 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
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
18 changes: 18 additions & 0 deletions
18
src/elements/content-sidebar/types/BoxAISidebarTypes.js.flow
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,18 @@ | ||
/** | ||
* Flowtype definitions for BoxAISidebarTypes.ts | ||
* Generated by Flowgen from a Typescript Definition | ||
* Flowgen v1.21.0 | ||
*/ | ||
|
||
import { type, QuestionType } from "@box/box-ai-content-answers"; | ||
import { type, AgentState } from "@box/box-ai-agent-selector"; | ||
export type BoxAISidebarCache = { | ||
agents: AgentState, | ||
encodedSession: string | null, | ||
questions: QuestionType[], | ||
... | ||
}; | ||
export type BoxAISidebarCacheSetter = ( | ||
key: "agents" | "encodedSession" | "questions", | ||
value: AgentState | QuestionType[] | string | null | ||
) => void; |