Skip to content

Commit

Permalink
Pkg upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
DustinBrett committed Oct 18, 2024
1 parent ef5087b commit 8b83cb0
Show file tree
Hide file tree
Showing 4 changed files with 222 additions and 206 deletions.
10 changes: 5 additions & 5 deletions components/system/Taskbar/AI/ai.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const MARKED_LIBS = [

const CONVO_STYLE_TEMPS: Record<
ConvoStyles,
AIAssistantCreateOptionsWithSystemPrompt
AILanguageModelCreateOptionsWithSystemPrompt
> = {
balanced: {
temperature: 0.5,
Expand Down Expand Up @@ -48,7 +48,7 @@ let cancel = false;
let responding = false;

let sessionId = 0;
let session: AIAssistant | ChatCompletionMessageParam[] | undefined;
let session: AILanguageModel | ChatCompletionMessageParam[] | undefined;
let engine: MLCEngine;

let markedLoaded = false;
Expand All @@ -67,9 +67,9 @@ globalThis.addEventListener(
sessionId = data.id;

if (data.hasWindowAI) {
(session as AIAssistant)?.destroy();
(session as AILanguageModel)?.destroy();

const config: AIAssistantCreateOptionsWithSystemPrompt = {
const config: AILanguageModelCreateOptionsWithSystemPrompt = {
...CONVO_STYLE_TEMPS[data.style],
systemPrompt: SYSTEM_PROMPT.content,
};
Expand Down Expand Up @@ -100,7 +100,7 @@ globalThis.addEventListener(

try {
if (data.hasWindowAI) {
const aiAssistant = session as AIAssistant;
const aiAssistant = session as AILanguageModel;

response = data.streamId
? aiAssistant?.promptStreaming(data.text)
Expand Down
2 changes: 1 addition & 1 deletion components/system/Taskbar/AI/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { type MarkedOptions } from "components/apps/Marked/useMarked";

declare global {
/* eslint-disable vars-on-top, no-var */
var ai: { languageModel: AIAssistantFactory };
var ai: { languageModel: AILanguageModelFactory };
var marked: {
parse: (markdownString: string, options: MarkedOptions) => string;
};
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"fflate": "^0.8.2",
"file-type": "^19.6.0",
"fix-webm-duration": "^1.0.6",
"framer-motion": "^11.11.8",
"framer-motion": "^11.11.9",
"gif.js": "^0.2.0",
"idb": "^8.0.0",
"ini": "^5.0.0",
Expand Down Expand Up @@ -86,24 +86,24 @@
"@axe-core/playwright": "^4.10.0",
"@next/bundle-analyzer": "^14.2.15",
"@next/eslint-plugin-next": "^14.2.15",
"@playwright/test": "1.48.0",
"@types/dom-chromium-ai": "^0.0.1",
"@playwright/test": "1.48.1",
"@types/dom-chromium-ai": "^0.0.2",
"@types/dompurify": "^3.0.5",
"@types/gif.js": "^0.2.5",
"@types/ini": "^4.1.1",
"@types/jest": "^29.5.13",
"@types/lunr": "^2.3.7",
"@types/minimist": "^1.2.5",
"@types/node": "^22.7.5",
"@types/node": "^22.7.6",
"@types/offscreencanvas": "^2019.7.3",
"@types/opentype.js": "^1.3.8",
"@types/react": "^18.3.11",
"@types/ua-parser-js": "^0.7.39",
"@types/video.js": "^7.3.58",
"@types/wicg-file-system-access": "^2023.10.5",
"@typescript-eslint/eslint-plugin": "^8.9.0",
"@typescript-eslint/parser": "^8.9.0",
"emulators": "^8.2.2",
"@typescript-eslint/eslint-plugin": "^8.10.0",
"@typescript-eslint/parser": "^8.10.0",
"emulators": "^8.3.0",
"emulators-ui": "^0.73.9",
"eruda": "^3.4.0",
"eslint": "^8.57.0",
Expand All @@ -119,9 +119,9 @@
"eslint-plugin-promise": "^7.1.0",
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-hooks-addons": "^0.4.0",
"eslint-plugin-react-hooks-addons": "^0.4.1",
"eslint-plugin-regexp": "^2.6.0",
"eslint-plugin-sonarjs": "^2.0.3",
"eslint-plugin-sonarjs": "^2.0.4",
"eslint-plugin-sort-keys-fix": "^1.1.2",
"eslint-plugin-typescript-sort-keys": "^3.3.0",
"eslint-plugin-unicorn": "^56.0.0",
Expand All @@ -135,15 +135,15 @@
"lunr": "^2.3.9",
"monaco-editor": "^0.52.0",
"pdfjs-dist": "^4.7.76",
"playwright-core": "1.48.0",
"playwright-core": "1.48.1",
"postcss": "^8.4.47",
"postcss-styled-syntax": "^0.6.4",
"postcss-syntax": "^0.36.2",
"serve": "^14.2.3",
"serve": "^14.2.4",
"stylelint": "^16.10.0",
"stylelint-config-standard": "^36.0.1",
"stylelint-order": "^6.0.4",
"terser": "^5.34.1",
"terser": "^5.36.0",
"tinymce": "^6.8.3",
"ts-prune": "^0.10.3",
"typescript": "^5.6.3",
Expand Down
Loading

0 comments on commit 8b83cb0

Please sign in to comment.