Skip to content

Commit 5503a4a

Browse files
committed
chore(workflow): build the package shared with rslib
1 parent 76ac188 commit 5503a4a

File tree

32 files changed

+85
-110
lines changed

32 files changed

+85
-110
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,5 @@ CLAUDE.md
119119
**/CLAUDE.md
120120
.cursor/rules/nx-rules.mdc
121121
.github/instructions/nx.instructions.md
122-
.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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ export default defineConfig({
6767
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),
6868
},
6969
},
70+
output: {
71+
externals: ['sharp'],
72+
},
7073
plugins: [
7174
pluginReact(),
7275
pluginNodePolyfill(),

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/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]],

biome.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"**/page-data/**",
3030
"**/dump.json",
3131
"**/dump-with-invisible.json",
32-
"**/dump-for-utils-test.json"
32+
"**/dump-for-utils-test.json",
33+
"**/.rslib"
3334
]
3435
},
3536
"javascript": {

packages/android-playground/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"isolatedModules": true,
1010
"jsx": "preserve",
1111
"lib": ["DOM", "ESNext"],
12-
"moduleResolution": "node",
12+
"moduleResolution": "bundler",
1313
"resolveJsonModule": true,
1414
"rootDir": "src",
1515
"skipLibCheck": true,

packages/android/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"isolatedModules": true,
1010
"jsx": "preserve",
1111
"lib": ["DOM", "ESNext"],
12-
"moduleResolution": "node",
12+
"moduleResolution": "bundler",
1313
"resolveJsonModule": true,
1414
"rootDir": "src",
1515
"skipLibCheck": true,

packages/cli/tsconfig.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,22 @@
88
"isolatedModules": true,
99
"jsx": "preserve",
1010
"lib": ["ESNext", "DOM"],
11-
"moduleResolution": "node",
11+
"moduleResolution": "bundler",
12+
"module": "esnext",
1213
"paths": {
1314
"@/*": ["./src/*"]
1415
},
1516
"resolveJsonModule": true,
1617
"rootDir": ".",
1718
"skipLibCheck": true,
18-
"strict": true
19+
"strict": true,
20+
"composite": true
1921
},
2022
"exclude": ["**/node_modules"],
21-
"include": ["src", "tests"]
23+
"include": ["src", "tests"],
24+
"references": [
25+
{
26+
"path": "../shared"
27+
}
28+
]
2229
}

packages/core/src/ai-model/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { assert } from '@midscene/shared/utils';
1515
import type {
1616
ChatCompletionSystemMessageParam,
1717
ChatCompletionUserMessageParam,
18-
} from 'openai/resources';
18+
} from 'openai/resources/index';
1919
import {
2020
call,
2121
callToGetJSONObject,

0 commit comments

Comments
 (0)