Skip to content

Commit

Permalink
Change variable name.
Browse files Browse the repository at this point in the history
  • Loading branch information
lublagg committed Jan 7, 2025
1 parent 145f801 commit 94a7fc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const App = observer(() => {
// along with another notification that provides the actual details of the change
if (notification.values.operation === "dataContextCountChanged") return;
assistantStoreRef.current.transcriptStore.addMessage(DEBUG_SPEAKER, {description: "Document change notice", content: formatJsonMessage(notification)});
await assistantStoreRef.current.sendCODAPDataContexts();
await assistantStoreRef.current.fetchAndSendDataContexts();
}, []);

const handleDataContextChangeNotice = useCallback(async (notification: ClientNotification) => {
Expand Down
6 changes: 3 additions & 3 deletions src/models/assistant-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const AssistantModel = types
description: "New thread created",
content: formatJsonMessage(self.thread)
});
sendCODAPDataContexts();
fetchAndSendDataContexts();
} catch (err) {
console.error("Failed to initialize assistant:", err);
self.transcriptStore.addMessage(DEBUG_SPEAKER, {
Expand All @@ -88,7 +88,7 @@ export const AssistantModel = types
}
});

const sendCODAPDataContexts = flow(function* () {
const fetchAndSendDataContexts = flow(function* () {
try {
const contexts = yield getListOfDataContexts();
const contextsDetails: Record<string, any> = {};
Expand Down Expand Up @@ -274,7 +274,7 @@ export const AssistantModel = types
}
});

return { createThread, deleteThread, initializeAssistant, handleMessageSubmit, sendCODAPDataContexts, sendCODAPDocumentInfo };
return { createThread, deleteThread, initializeAssistant, handleMessageSubmit, fetchAndSendDataContexts, sendCODAPDocumentInfo };
});

export interface AssistantModelType extends Instance<typeof AssistantModel> {}

0 comments on commit 94a7fc2

Please sign in to comment.