-
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 (#3928)
* feat(boxai-sidebar): Add cache for Agent Selector * chore(): add missing line end * feat(boxai-sidebar): Add cache for Agent Selector Add missing Flow types and agents prop to mocked cache in tests. Remove unneeded type import. --------- Co-authored-by: Dawid Jankowiak <[email protected]>
- Loading branch information
1 parent
dc5d352
commit 0a88f20
Showing
7 changed files
with
133 additions
and
82 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
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
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; |
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,10 @@ | ||
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; |