mirror of
https://github.com/geoffsee/open-gsio.git
synced 2025-09-08 22:56:46 +00:00
Refactor store exports and cleanup unused code.
Removed the centralized store export file to streamline dependencies and replaced indirect imports with direct ones for better maintainability. Additionally, eliminated unused views in `ClientChatStore` and commented out redundant code in the assistant SDK.
This commit is contained in:

committed by
Geoff Seemueller

parent
afd539a245
commit
d519534c7d
@@ -2,7 +2,7 @@ import { applySnapshot, flow, Instance, types } from "mobx-state-tree";
|
|||||||
import Message from "../models/Message";
|
import Message from "../models/Message";
|
||||||
import Attachment from "../models/Attachment";
|
import Attachment from "../models/Attachment";
|
||||||
import IntermediateStep from "../models/IntermediateStep";
|
import IntermediateStep from "../models/IntermediateStep";
|
||||||
import { UserOptionsStore } from "./index";
|
import UserOptionsStore from "./UserOptionsStore";
|
||||||
|
|
||||||
const ClientChatStore = types
|
const ClientChatStore = types
|
||||||
.model("ClientChatStore", {
|
.model("ClientChatStore", {
|
||||||
@@ -15,11 +15,6 @@ const ClientChatStore = types
|
|||||||
tools: types.optional(types.array(types.string), []),
|
tools: types.optional(types.array(types.string), []),
|
||||||
intermediateSteps: types.array(IntermediateStep),
|
intermediateSteps: types.array(IntermediateStep),
|
||||||
})
|
})
|
||||||
.views((self) => ({
|
|
||||||
get getModel() {
|
|
||||||
return self.model;
|
|
||||||
},
|
|
||||||
}))
|
|
||||||
.actions((self) => ({
|
.actions((self) => ({
|
||||||
cleanup() {
|
cleanup() {
|
||||||
if (self.eventSource) {
|
if (self.eventSource) {
|
||||||
@@ -321,6 +316,7 @@ const ClientChatStore = types
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
export type IMessage = Instance<typeof Message>;
|
export type IMessage = Instance<typeof Message>;
|
||||||
|
|
||||||
export type IClientChatStore = Instance<typeof this>;
|
export type IClientChatStore = Instance<typeof this>;
|
||||||
|
|
||||||
export default ClientChatStore.create();
|
export default ClientChatStore.create();
|
||||||
|
@@ -1,15 +0,0 @@
|
|||||||
import AppMenuStore from "./AppMenuStore";
|
|
||||||
import ClientChatStore from "./ClientChatStore";
|
|
||||||
import ClientFeedbackStore from "./ClientFeedbackStore";
|
|
||||||
import ClientTransactionStore from "./ClientTransactionStore";
|
|
||||||
import FileUploadStore from "./FileUploadStore";
|
|
||||||
import UserOptionsStore from "./UserOptionsStore";
|
|
||||||
|
|
||||||
export {
|
|
||||||
AppMenuStore,
|
|
||||||
ClientChatStore,
|
|
||||||
ClientFeedbackStore,
|
|
||||||
ClientTransactionStore,
|
|
||||||
FileUploadStore,
|
|
||||||
UserOptionsStore,
|
|
||||||
};
|
|
@@ -23,17 +23,17 @@ export class AssistantSdk {
|
|||||||
const now = new Date();
|
const now = new Date();
|
||||||
const formattedMinutes = String(now.getMinutes()).padStart(2, "0");
|
const formattedMinutes = String(now.getMinutes()).padStart(2, "0");
|
||||||
const currentTime = `${now.getHours()}:${formattedMinutes} ${now.getSeconds()}s`;
|
const currentTime = `${now.getHours()}:${formattedMinutes} ${now.getSeconds()}s`;
|
||||||
const toolsInfo =
|
// const toolsInfo =
|
||||||
tools
|
// tools
|
||||||
.map((tool) => {
|
// .map((tool) => {
|
||||||
switch (tool) {
|
// switch (tool) {
|
||||||
// case "user-attachments": return "### Attachments\nUser supplied attachments are normalized to text and will have this header (# Attachment:...) in the message.";
|
// // case "user-attachments": return "### Attachments\nUser supplied attachments are normalized to text and will have this header (# Attachment:...) in the message.";
|
||||||
// case "web-search": return "### Web Search\nResults are optionally available in 'Live Search'.";
|
// // case "web-search": return "### Web Search\nResults are optionally available in 'Live Search'.";
|
||||||
default:
|
// default:
|
||||||
return `- ${tool}`;
|
// return `- ${tool}`;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
.join("\n\n") || "- No additional tools selected.";
|
// .join("\n\n") || "- No additional tools selected.";
|
||||||
|
|
||||||
return `# Assistant Knowledge
|
return `# Assistant Knowledge
|
||||||
## Current Context
|
## Current Context
|
||||||
|
Reference in New Issue
Block a user