Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/braces-3.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Hailong-am authored Jul 23, 2024
2 parents 36452a7 + 3ab558e commit af127b4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export const configSchema = schema.object({
incontextInsight: schema.object({
enabled: schema.boolean({ defaultValue: true }),
}),
next: schema.object({
enabled: schema.boolean({ defaultValue: false }),
}),
});

export type ConfigSchema = TypeOf<typeof configSchema>;
1 change: 1 addition & 0 deletions public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export class AssistantPlugin
actionExecutors[actionType] = execute;
},
chatEnabled: () => this.config.chat.enabled,
nextEnabled: () => this.config.next.enabled,
assistantActions,
registerIncontextInsight: this.incontextInsightRegistry.register.bind(
this.incontextInsightRegistry
Expand Down
4 changes: 4 additions & 0 deletions public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ export interface AssistantSetup {
* Returns true if chat UI is enabled.
*/
chatEnabled: () => boolean;
/**
* Returns true if contextual assistant is enabled.
*/
nextEnabled: () => boolean;
assistantActions: Omit<AssistantActions, 'executeAction'>;
registerIncontextInsight: IncontextInsightRegistry['register'];
renderIncontextInsight: (component: React.ReactNode) => React.ReactNode;
Expand Down
1 change: 1 addition & 0 deletions server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const config: PluginConfigDescriptor<ConfigSchema> = {
exposeToBrowser: {
chat: true,
incontextInsight: true,
next: true,
},
schema: configSchema,
};
Expand Down

0 comments on commit af127b4

Please sign in to comment.