mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 06:42:03 +00:00
chore: remove Conversation.path field and update dependencies
- Remove unused `path` property from Conversation class and its test - Initialize `items` and `conversations` arrays in ConversationHistoryModal - Use `Exception.messageFrom()` for safer error serialization in StreamingMarkdownService - Fix redundant type cast in obsidian mock's Events.on() - Bump @anthropic-ai/sdk, @google/genai, openai, esbuild, svelte, typescript, vitest, and other minor deps
This commit is contained in:
parent
df44c7ad62
commit
b752d8e75b
9 changed files with 904 additions and 718 deletions
|
|
@ -13,7 +13,6 @@ export class Conversation {
|
|||
title: string;
|
||||
created: Date;
|
||||
updated: Date;
|
||||
path: string;
|
||||
|
||||
contents: ConversationContent[] = [];
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ export class ConversationHistoryModal extends Modal {
|
|||
private readonly chatService: ChatService = Resolve<ChatService>(Services.ChatService);
|
||||
|
||||
private component: ReturnType<typeof mount> | null = null;
|
||||
private items: IListItem[];
|
||||
private conversations: Conversation[];
|
||||
private items: IListItem[] = [];
|
||||
private conversations: Conversation[] = [];
|
||||
public onModalClose?: () => void;
|
||||
|
||||
constructor() {
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ export class StreamingMarkdownService {
|
|||
const result = this.processor.processSync(preprocessed);
|
||||
return String(result);
|
||||
} catch (error) {
|
||||
Exception.warn(`Markdown processing failed:\n${error}`);
|
||||
Exception.warn(`Markdown processing failed:\n${Exception.messageFrom(error)}`);
|
||||
return this.getFallbackHTML(text);
|
||||
}
|
||||
}
|
||||
|
|
@ -118,7 +118,7 @@ export class StreamingMarkdownService {
|
|||
this.htmlService.setHTMLContent(state.element, html);
|
||||
state.lastProcessedLength = state.buffer.length;
|
||||
} catch (error) {
|
||||
Exception.warn(`Streaming render failed:\n${error}`);
|
||||
Exception.warn(`Streaming render failed:\n${Exception.messageFrom(error)}`);
|
||||
}
|
||||
|
||||
this.renderTimeouts.delete(messageId);
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ export class Events {
|
|||
this.events.set(name, []);
|
||||
}
|
||||
const boundCallback: (...data: unknown[]) => unknown = ctx
|
||||
? (...args: unknown[]) => callback.apply(ctx, args) as unknown
|
||||
? (...args: unknown[]) => callback.apply(ctx, args)
|
||||
: callback;
|
||||
this.events.get(name)!.push(boundCallback);
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -38,12 +38,6 @@ describe('Conversation', () => {
|
|||
expect(conversation.contents).toEqual([]);
|
||||
expect(Array.isArray(conversation.contents)).toBe(true);
|
||||
});
|
||||
|
||||
it('should not have path set initially', () => {
|
||||
const conversation = new Conversation();
|
||||
|
||||
expect(conversation.path).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe('isConversationData', () => {
|
||||
|
|
|
|||
4
global.d.ts
vendored
Normal file
4
global.d.ts
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
declare module '*.css' {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
1565
package-lock.json
generated
1565
package-lock.json
generated
File diff suppressed because it is too large
Load diff
30
package.json
30
package.json
|
|
@ -25,38 +25,38 @@
|
|||
"@types/express": "^5.0.6",
|
||||
"@types/node": "^25.5.0",
|
||||
"@types/path-browserify": "^1.0.3",
|
||||
"@typescript-eslint/eslint-plugin": "8.57.1",
|
||||
"@typescript-eslint/parser": "8.57.1",
|
||||
"@vitest/ui": "^4.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "8.58.0",
|
||||
"@typescript-eslint/parser": "8.58.0",
|
||||
"@vitest/ui": "^4.1.2",
|
||||
"builtin-modules": "5.0.0",
|
||||
"esbuild": "^0.27.4",
|
||||
"esbuild": "^0.28.0",
|
||||
"esbuild-svelte": "^0.9.4",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-obsidianmd": "^0.1.9",
|
||||
"happy-dom": "^20.8.4",
|
||||
"happy-dom": "^20.8.9",
|
||||
"obsidian": "latest",
|
||||
"svelte": "^5.54.1",
|
||||
"svelte-check": "^4.4.5",
|
||||
"svelte": "^5.55.1",
|
||||
"svelte-check": "^4.4.6",
|
||||
"svelte-preprocess": "^6.0.3",
|
||||
"tslib": "2.8.1",
|
||||
"typescript": "^5.9.3",
|
||||
"vitest": "^4.1.0"
|
||||
"typescript": "^6.0.2",
|
||||
"vitest": "^4.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "^0.80.0",
|
||||
"@google/genai": "^1.46.0",
|
||||
"@anthropic-ai/sdk": "^0.82.0",
|
||||
"@google/genai": "^1.48.0",
|
||||
"@shikijs/rehype": "^4.0.2",
|
||||
"core-js": "^3.49.0",
|
||||
"diff": "^8.0.3",
|
||||
"diff": "^8.0.4",
|
||||
"diff2html": "^3.4.56",
|
||||
"express": "^5.2.1",
|
||||
"fuzzysort": "^3.1.0",
|
||||
"highlight.js": "^11.11.1",
|
||||
"katex": "^0.16.40",
|
||||
"katex": "^0.16.44",
|
||||
"lowlight": "^3.3.0",
|
||||
"officeparser": "^6.0.4",
|
||||
"openai": "^6.32.0",
|
||||
"officeparser": "^6.0.7",
|
||||
"openai": "^6.33.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"regex-parser": "^2.3.1",
|
||||
"rehype-highlight": "^7.0.2",
|
||||
|
|
|
|||
|
|
@ -2,14 +2,13 @@
|
|||
"compilerOptions": {
|
||||
"verbatimModuleSyntax": true,
|
||||
"skipLibCheck": true,
|
||||
"baseUrl": ".",
|
||||
"inlineSourceMap": true,
|
||||
"inlineSources": true,
|
||||
"module": "ESNext",
|
||||
"target": "ES6",
|
||||
"target": "ES2020",
|
||||
"allowJs": true,
|
||||
"noImplicitAny": true,
|
||||
"moduleResolution": "node",
|
||||
"moduleResolution": "bundler",
|
||||
"importHelpers": true,
|
||||
"isolatedModules": true,
|
||||
"strictNullChecks": true,
|
||||
|
|
@ -20,6 +19,7 @@
|
|||
"ES7"
|
||||
],
|
||||
"paths": {
|
||||
"main": ["./main.ts"],
|
||||
"Helpers/*": ["./Helpers/*"],
|
||||
"Enums/*": ["./Enums/*"],
|
||||
"Services/*": ["./Services/*"],
|
||||
|
|
|
|||
Loading…
Reference in a new issue