MAJOR REFACTOR (#494)
* move index to home folder, create state and context files and barrell folder * Sanity Check Commit: reducer added to home.tsx manual QA all working * WIP: promptBar * fix missing json parse on folders and prompts * split context and add promptbar context * add context to nested prompt componets and componetize Folder componet * remove log * Create buttons folder and componetize sidebar action button * tidy up prompt handlers * componetized sidebar * added back chatbar componet to left side sidebar * monster commit: Componetized the common code between chatbar and promptbar into new componet Sidebar and added context to both bars * add useFetch service * added prettier import sort to keep imports ordered and easier to indentify * added react query and useFetch to work with RQ * added apiService, errorService and reactQuery * add callback and tidy up error service * refactor chat and child componets to useContext * fix extra calls and bad calls to mel endpoint * minor import cleanup --------- Co-authored-by: jc.durbin <jc.durbin@ardanis.com>
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
import { ExportFormatV1, ExportFormatV2, ExportFormatV4 } from '@/types/export';
|
||||
import { OpenAIModels, OpenAIModelID } from '@/types/openai';
|
||||
import { DEFAULT_SYSTEM_PROMPT } from '@/utils/app/const';
|
||||
import { it, describe, expect } from 'vitest';
|
||||
|
||||
import {
|
||||
cleanData,
|
||||
isExportFormatV1,
|
||||
@@ -12,6 +8,11 @@ import {
|
||||
isLatestExportFormat,
|
||||
} from '@/utils/app/importExport';
|
||||
|
||||
import { ExportFormatV1, ExportFormatV2, ExportFormatV4 } from '@/types/export';
|
||||
import { OpenAIModelID, OpenAIModels } from '@/types/openai';
|
||||
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
describe('Export Format Functions', () => {
|
||||
describe('isExportFormatV1', () => {
|
||||
it('should return true for v1 format', () => {
|
||||
@@ -105,7 +106,7 @@ describe('cleanData Functions', () => {
|
||||
},
|
||||
],
|
||||
folders: [],
|
||||
prompts:[]
|
||||
prompts: [],
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -212,7 +213,7 @@ describe('cleanData Functions', () => {
|
||||
},
|
||||
],
|
||||
} as ExportFormatV4;
|
||||
|
||||
|
||||
const obj = cleanData(data);
|
||||
expect(isLatestExportFormat(obj)).toBe(true);
|
||||
expect(obj).toEqual({
|
||||
@@ -253,9 +254,7 @@ describe('cleanData Functions', () => {
|
||||
folderId: null,
|
||||
},
|
||||
],
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user