Skip to content

Commit 4039d5e

Browse files
committed
chore(core): merge main
2 parents e9b33fa + 8dad93a commit 4039d5e

File tree

93 files changed

+8910
-17426
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+8910
-17426
lines changed

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ common/autoinstallers/*/.npmrc
7272
# pnpm store
7373
.pnpm-store
7474

75-
.eden-mono
76-
7775
dist
7876
dist-script
7977
doc_build
@@ -121,4 +119,5 @@ CLAUDE.md
121119
**/CLAUDE.md
122120
.cursor/rules/nx-rules.mdc
123121
.github/instructions/nx.instructions.md
124-
.gemini-clipboard
122+
.gemini-clipboard
123+
tsconfig.build.tsbuildinfo

apps/android-playground/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"@rsbuild/plugin-node-polyfill": "1.3.0",
3030
"@rsbuild/plugin-react": "^1.3.1",
3131
"@rsbuild/plugin-svgr": "^1.1.1",
32+
"@rsbuild/plugin-type-check": "1.2.3",
3233
"@types/react": "^18.3.1",
3334
"@types/react-dom": "^18.3.1",
3435
"archiver": "^6.0.0",

apps/android-playground/rsbuild.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export default defineConfig({
4545
},
4646
output: {
4747
target: 'web',
48+
externals: ['sharp'],
4849
sourceMap: true,
4950
},
5051
html: {
@@ -66,6 +67,9 @@ export default defineConfig({
6667
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),
6768
},
6869
},
70+
output: {
71+
externals: ['sharp'],
72+
},
6973
plugins: [
7074
pluginReact(),
7175
pluginNodePolyfill(),

apps/android-playground/src/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { type Socket, io } from 'socket.io-client';
2323
import AdbDevice from './adb-device';
2424
import ScrcpyPlayer, { type ScrcpyRefMethods } from './scrcpy-player';
2525

26-
import '@midscene/visualizer/index.css';
2726
import './adb-device/index.less';
2827

2928
const { Content } = Layout;
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
export default {};
1+
const AsyncLocalStorage = {};
2+
export { AsyncLocalStorage };

apps/android-playground/tsconfig.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,25 @@
1717
/* type checking */
1818
"strict": true,
1919
"noUnusedLocals": true,
20-
"noUnusedParameters": true
20+
"noUnusedParameters": true,
21+
"composite": true
2122
},
22-
"include": ["src"]
23+
"include": ["src"],
24+
"references": [
25+
{
26+
"path": "../../packages/android"
27+
},
28+
{
29+
"path": "../../packages/core"
30+
},
31+
{
32+
"path": "../../packages/shared"
33+
},
34+
{
35+
"path": "../../packages/visualizer"
36+
},
37+
{
38+
"path": "../../packages/web-integration"
39+
}
40+
]
2341
}

apps/chrome-extension/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"archiver": "^6.0.0",
4444
"less": "^4.2.0",
4545
"tailwindcss": "4.1.11",
46-
"typescript": "^5.8.3"
46+
"typescript": "^5.8.3",
47+
"openai": "4.81.0"
4748
}
4849
}

apps/chrome-extension/src/extension/popup.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
globalThemeConfig,
1313
useEnvConfig,
1414
} from '@midscene/visualizer';
15-
import '@midscene/visualizer/index.css';
1615
import { ConfigProvider, Dropdown, Typography } from 'antd';
1716
import { useEffect, useState } from 'react';
1817
import { BrowserExtensionPlayground } from '../components/playground';

apps/chrome-extension/src/extension/recorder/utils.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import type { ChromeRecordedEvent } from '@midscene/recorder';
88
import { message } from 'antd';
99
import { saveAs } from 'file-saver';
1010
import JSZip from 'jszip';
11+
import type { ChatCompletionContentPart } from 'openai/resources/index';
1112
import type { RecordingSession } from '../../store';
1213
import { recordLogger } from './logger';
1314
import { isChromeExtension, safeChromeAPI } from './types';
@@ -278,7 +279,7 @@ export const generateRecordTitle = async (
278279
const screenshots = getScreenshotsForLLM(events);
279280

280281
// Create the message content
281-
const messageContent: Array<string | Record<string, any>> = [
282+
const messageContent: ChatCompletionContentPart[] = [
282283
{
283284
type: 'text',
284285
text: `Generate a concise title (5-7 words) and brief description (1-2 sentences) for a browser recording session with the following events:\n\n${JSON.stringify(summary, null, 2)}\n\nRespond with a JSON object containing "title" and "description" fields. The title should be action-oriented and highlight the main task accomplished. The description should provide slightly more detail about what was done.`,
@@ -313,7 +314,7 @@ export const generateRecordTitle = async (
313314
role: 'user',
314315
content: messageContent,
315316
},
316-
];
317+
] as const;
317318

318319
const response = await callAiFn(
319320
[prompt[0], prompt[1]],
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
export default {};
1+
const AsyncLocalStorage = {};
2+
export { AsyncLocalStorage };

0 commit comments

Comments
 (0)