mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-25 00:16:29 +02:00
auto-enable composio gmail sync when signed in
This commit is contained in:
parent
dd361cb6bf
commit
16b8975b00
3 changed files with 5 additions and 4 deletions
|
|
@ -273,8 +273,8 @@ export function listConnected(): { toolkits: string[] } {
|
|||
/**
|
||||
* Check if Composio should be used for Google services (Gmail, etc.)
|
||||
*/
|
||||
export function useComposioForGoogle(): { enabled: boolean } {
|
||||
return { enabled: composioClient.useComposioForGoogle() };
|
||||
export async function useComposioForGoogle(): Promise<{ enabled: boolean }> {
|
||||
return { enabled: await composioClient.useComposioForGoogle() };
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -107,7 +107,8 @@ export async function isConfigured(): Promise<boolean> {
|
|||
/**
|
||||
* Check if Composio should be used for Google services (Gmail, etc.)
|
||||
*/
|
||||
export function useComposioForGoogle(): boolean {
|
||||
export async function useComposioForGoogle(): Promise<boolean> {
|
||||
if (await isSignedIn()) return true;
|
||||
const config = loadConfig();
|
||||
return config.use_composio_for_google === true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -786,7 +786,7 @@ export async function init() {
|
|||
console.log("Starting Gmail Sync (TS)...");
|
||||
console.log(`Will sync every ${SYNC_INTERVAL_MS / 1000} seconds.`);
|
||||
|
||||
const composioMode = useComposioForGoogle();
|
||||
const composioMode = await useComposioForGoogle();
|
||||
if (composioMode) {
|
||||
console.log('[Gmail] Using Composio backend for Gmail sync.');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue