Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
jczhong84 committed Nov 14, 2024
1 parent f311e10 commit 283f927
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AICommandType, AISocketEvent } from 'const/aiAssistant';
import aiAssistantSocket from 'lib/ai-assistant/ai-assistant-socketio';

/**
* Remove overlapping part with prefix from completion.
* A hacky workaround to remove overlapping part with prefix from completion.
*
* e.g. removeOverlapPrefix('sel', 'elect *') => 'ect *'
*/
Expand Down Expand Up @@ -73,14 +73,16 @@ export const useSqlCompleteExtension = ({
return [];
}

return inlineCopilot(async (prefix, suffix) => {
return await getCodeCompletionFromWebSocket({
query_engine_id: engineId,
tables: Array.from(tables ?? []),
prefix,
suffix,
});
}, 1000);
return inlineCopilot(
(prefix, suffix) =>
getCodeCompletionFromWebSocket({
query_engine_id: engineId,
tables: Array.from(tables ?? []),
prefix,
suffix,
}),
1000
);
}, [enabled, tables]);

return extension;
Expand Down

0 comments on commit 283f927

Please sign in to comment.