mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-11 11:57:03 -07:00
fix: resolve monorepo type errors and stabilize build
This PR addresses several critical build and type-checking issues across the monorepo: 1. **Core Package Stability**: Removed deprecated `baseUrl` from `packages/core/tsconfig.json` and converted absolute-style imports to relative paths. This allows `tsc --build` to succeed reliably. 2. **Modern JS API Support**: Upgraded `lib` to `ES2023` in `packages/test-utils` and `packages/vscode-ide-companion` to resolve errors related to `Error.cause` and other modern JavaScript features. 3. **SDK Type Integrity**: Fixed several `noImplicitAny` errors and resolved inheritance issues in `SdkTool` and `SdkToolInvocation` by refining generic constraints and adding necessary ESLint disable comments for complex type bypasses. 4. **DevTools ESM Compliance**: Added missing `.js` extensions to relative imports in the DevTools client and fixed un-typed property access in log objects. 5. **Build Graph Optimization**: Added missing project references in `test-utils` and removed redundant `paths` in `evals` to ensure correct build order and declaration resolution. These changes collectively restore the ability to run `npm run typecheck` and `npm run build` across the entire project. cc @google-gemini/gemini-cli-maintainers
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import React, { useState, useEffect, useRef, useMemo } from 'react';
|
||||
import { useDevToolsData, type ConsoleLog, type NetworkLog } from './hooks';
|
||||
import { useDevToolsData, type ConsoleLog, type NetworkLog } from './hooks.js';
|
||||
|
||||
type ThemeMode = 'light' | 'dark' | null; // null means follow system
|
||||
|
||||
@@ -177,7 +177,7 @@ export default function App() {
|
||||
const entries: Array<{ timestamp: number; data: object }> = [];
|
||||
|
||||
// Export console logs
|
||||
filteredConsoleLogs.forEach((log) => {
|
||||
filteredConsoleLogs.forEach((log: ConsoleLog) => {
|
||||
entries.push({
|
||||
timestamp: log.timestamp,
|
||||
data: {
|
||||
@@ -190,7 +190,7 @@ export default function App() {
|
||||
});
|
||||
|
||||
// Export network logs
|
||||
filteredNetworkLogs.forEach((log) => {
|
||||
filteredNetworkLogs.forEach((log: NetworkLog) => {
|
||||
entries.push({
|
||||
timestamp: log.timestamp,
|
||||
data: {
|
||||
@@ -249,7 +249,9 @@ export default function App() {
|
||||
if (selectedSessionId === importedSessionId && importedLogs) {
|
||||
return importedLogs.console;
|
||||
}
|
||||
return consoleLogs.filter((l) => l.sessionId === selectedSessionId);
|
||||
return consoleLogs.filter(
|
||||
(l: ConsoleLog) => l.sessionId === selectedSessionId,
|
||||
);
|
||||
}, [consoleLogs, selectedSessionId, importedSessionId, importedLogs]);
|
||||
|
||||
const filteredNetworkLogs = useMemo(() => {
|
||||
@@ -257,7 +259,9 @@ export default function App() {
|
||||
if (selectedSessionId === importedSessionId && importedLogs) {
|
||||
return importedLogs.network;
|
||||
}
|
||||
return networkLogs.filter((l) => l.sessionId === selectedSessionId);
|
||||
return networkLogs.filter(
|
||||
(l: NetworkLog) => l.sessionId === selectedSessionId,
|
||||
);
|
||||
}, [networkLogs, selectedSessionId, importedSessionId, importedLogs]);
|
||||
|
||||
return (
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import App from './App';
|
||||
import App from './App.js';
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')!).render(
|
||||
<React.StrictMode>
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run build:client && tsc -p tsconfig.build.json",
|
||||
"build:client": "node esbuild.client.js"
|
||||
"build:client": "node esbuild.client.js",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
export interface NetworkLog {
|
||||
id: string;
|
||||
type?: string;
|
||||
sessionId?: string;
|
||||
timestamp: number;
|
||||
method: string;
|
||||
|
||||
Reference in New Issue
Block a user