mirror of
https://github.com/geoffsee/open-gsio.git
synced 2025-09-08 22:56:46 +00:00
adds eslint
This commit is contained in:

committed by
Geoff Seemueller

parent
9698fc6f3b
commit
02c3253343
@@ -1,6 +1,6 @@
|
||||
import { types } from "mobx-state-tree";
|
||||
import { types } from 'mobx-state-tree';
|
||||
|
||||
export default types.model("ContactRecord", {
|
||||
export default types.model('ContactRecord', {
|
||||
message: types.string,
|
||||
timestamp: types.string,
|
||||
email: types.string,
|
||||
|
@@ -1,10 +1,10 @@
|
||||
// FeedbackRecord.ts
|
||||
import { types } from "mobx-state-tree";
|
||||
import { types } from 'mobx-state-tree';
|
||||
|
||||
const FeedbackRecord = types.model("FeedbackRecord", {
|
||||
const FeedbackRecord = types.model('FeedbackRecord', {
|
||||
feedback: types.string,
|
||||
timestamp: types.string,
|
||||
user: types.optional(types.string, "Anonymous"),
|
||||
user: types.optional(types.string, 'Anonymous'),
|
||||
});
|
||||
|
||||
export default FeedbackRecord;
|
||||
|
@@ -1,12 +1,12 @@
|
||||
// Base Message
|
||||
import { type Instance, types } from "mobx-state-tree";
|
||||
import { type Instance, types } from 'mobx-state-tree';
|
||||
|
||||
export default types
|
||||
.model("Message", {
|
||||
.model('Message', {
|
||||
content: types.string,
|
||||
role: types.enumeration(["user", "assistant", "system"]),
|
||||
role: types.enumeration(['user', 'assistant', 'system']),
|
||||
})
|
||||
.actions((self) => ({
|
||||
.actions(self => ({
|
||||
setContent(newContent: string) {
|
||||
self.content = newContent;
|
||||
},
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { types } from "mobx-state-tree";
|
||||
import { types } from 'mobx-state-tree';
|
||||
|
||||
export default types
|
||||
.model("O1Message", {
|
||||
role: types.enumeration(["user", "assistant", "system"]),
|
||||
.model('O1Message', {
|
||||
role: types.enumeration(['user', 'assistant', 'system']),
|
||||
content: types.array(
|
||||
types.model({
|
||||
type: types.string,
|
||||
@@ -10,11 +10,11 @@ export default types
|
||||
}),
|
||||
),
|
||||
})
|
||||
.actions((self) => ({
|
||||
setContent(newContent: string, contentType: string = "text") {
|
||||
.actions(self => ({
|
||||
setContent(newContent: string, contentType: string = 'text') {
|
||||
self.content = [{ type: contentType, text: newContent }];
|
||||
},
|
||||
append(newContent: string, contentType: string = "text") {
|
||||
append(newContent: string, contentType: string = 'text') {
|
||||
self.content.push({ type: contentType, text: newContent });
|
||||
},
|
||||
}));
|
||||
|
@@ -1,12 +1,12 @@
|
||||
// Models
|
||||
import { types } from "mobx-state-tree";
|
||||
import { types } from 'mobx-state-tree';
|
||||
|
||||
export default types
|
||||
.model("Message", {
|
||||
.model('Message', {
|
||||
content: types.string,
|
||||
role: types.enumeration(["user", "assistant", "system"]),
|
||||
role: types.enumeration(['user', 'assistant', 'system']),
|
||||
})
|
||||
.actions((self) => ({
|
||||
.actions(self => ({
|
||||
setContent(newContent: string) {
|
||||
self.content = newContent;
|
||||
},
|
||||
|
Reference in New Issue
Block a user