feat(ext): handling page reload/redirect/close
This commit is contained in:
@@ -132,6 +132,16 @@ export interface AgentCommandProtocol {
|
||||
'agent:configure': (config: { apiKey: string; baseURL: string; model: string }) => void
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Content Script Query Protocol: ContentScript -> Background
|
||||
// Used by ContentScript to query Background state
|
||||
// ============================================================================
|
||||
|
||||
export interface ContentScriptQueryProtocol {
|
||||
/** Check if there's an active task for this tab, returns true if mask should be shown */
|
||||
'content:shouldShowMask': () => boolean
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Event Protocol: Background -> SidePanel
|
||||
// Used by Background to push updates to SidePanel
|
||||
@@ -165,3 +175,9 @@ export const agentCommands = defineExtensionMessaging<AgentCommandProtocol>()
|
||||
* Background sends, SidePanel receives
|
||||
*/
|
||||
export const agentEvents = defineExtensionMessaging<AgentEventProtocol>()
|
||||
|
||||
/**
|
||||
* Content script query messaging
|
||||
* ContentScript sends, Background receives
|
||||
*/
|
||||
export const contentScriptQuery = defineExtensionMessaging<ContentScriptQueryProtocol>()
|
||||
|
||||
Reference in New Issue
Block a user