Files
lobe-chat/tsconfig.json
Innei f74befadc9 ♻️ refactor(electron-main): client ipc decorate (#10679)
* refactor: client ipc

* refactor: server ipc

refactor: update IPC method names for consistency

Signed-off-by: Innei <tukon479@gmail.com>

fix: cast IPC return type to DesktopIpcServices for type safety

Signed-off-by: Innei <tukon479@gmail.com>

chore: add new workspace for desktop application in package.json

Signed-off-by: Innei <tukon479@gmail.com>

fix: export FileMetadata interface for improved accessibility

Signed-off-by: Innei <tukon479@gmail.com>

refactor: unify IPC mocking across test files for consistency

Signed-off-by: Innei <tukon479@gmail.com>

feat: enhance type-safe IPC flow with context propagation and service registry

- Introduced `getIpcContext()` and `runWithIpcContext()` for improved context management in IPC handlers.
- Updated `BrowserWindowsCtr` methods to utilize the new context handling.
- Added `McpInstallCtr` to the IPC constructors registry.
- Enhanced README with details on the new type-safe IPC features.

Signed-off-by: Innei <tukon479@gmail.com>

refactor: enhance IPC method registration for improved type safety

- Updated `registerMethod` in `IpcHandler` and `IpcService` to accept variable argument types, enhancing flexibility in method signatures.
- Simplified the `ExtractMethodSignature` type to support multiple arguments.

Signed-off-by: Innei <tukon479@gmail.com>

chore: add global type definitions and refactor import statements

- Introduced a new global type definition file to support Vite client imports.
- Refactored import statements in `App.ts` and `App.test.ts` to remove unnecessary type casting for `import.meta.glob`, improving code clarity.

Signed-off-by: Innei <tukon479@gmail.com>

* refactor: make groupName in BrowserWindowsCtr readonly for better encapsulation

Signed-off-by: Innei <tukon479@gmail.com>

* refactor: update IPC method registration and usage for improved type safety and consistency

- Replaced `@ipcClientEvent` with `@IpcMethod()` in various controllers to standardize IPC method definitions.
- Enhanced the usage of `ensureElectronIpc()` for type-safe IPC calls in service layers.
- Updated `BrowserWindowsCtr` and `NotificationCtr` to utilize the new IPC method structure, improving encapsulation and clarity.
- Refactored service methods to eliminate manual string concatenation for IPC event names, ensuring better maintainability.

Signed-off-by: Innei <tukon479@gmail.com>

---------

Signed-off-by: Innei <tukon479@gmail.com>
2025-12-09 15:01:18 +08:00

57 lines
1.3 KiB
JSON

{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ESNext",
"lib": ["dom", "dom.iterable", "esnext", "webworker"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"incremental": true,
"types": ["vitest/globals", "@serwist/next/typings"],
"paths": {
"@/database/*": ["./packages/database/src/*", "./src/database/*"],
"@/const/*": ["./packages/const/src/*", "./src/const/*"],
"@/utils/*": ["./packages/utils/src/*", "./src/utils/*"],
"@/types/*": ["./packages/types/src/*", "./src/types/*"],
"@/*": ["./src/*"],
"~test-utils": ["./tests/utils.tsx"]
},
"plugins": [
{
"name": "next"
}
]
},
"exclude": [
"node_modules",
"public/sw.js",
"apps/desktop",
"apps/mobile",
"tmp",
"temp",
".temp",
"e2e"
],
"include": [
"**/*.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"next-env.d.ts",
".next/dev/types/**/*.ts"
],
"references": [
{
"path": "./apps/desktop"
}
]
}