Skip to content

Fix Type Errors and Build Failures Across Core Packages#21

Merged
rifkybujana merged 4 commits into
KolosalAI:mainfrom
mininxd:main
Dec 17, 2025
Merged

Fix Type Errors and Build Failures Across Core Packages#21
rifkybujana merged 4 commits into
KolosalAI:mainfrom
mininxd:main

Conversation

@mininxd

@mininxd mininxd commented Nov 29, 2025

Copy link
Copy Markdown
Contributor

This pull request resolves several build failures triggered by inconsistent type definitions, missing libraries, and mismatched Undici types. The updates include cleaning up TypeScript configuration, normalizing type roots, and adding the missing dependencies required for stable builds.

Key fixes include correcting the FSWatcher test type, adding proper uuid and @types/uuid dependencies, registering Node types in all relevant tsconfig files, and downgrading @types/minimatch to a compatible version. The PR also updates package configs in the vscode-ide-companion package and addresses Header and Dispatcher type issues that were breaking the api-server build.

- Downgrade @types/minimatch from latest to previous due to compatibility issues
- Add uuid and @types/uuid dependencies to cli, core, and vscode-ide-companion packages
- Add "node" types to tsconfig.json files for proper type resolution
- Fix FSWatcher type definition in useGitBranchName.test.ts
- Add types directory to tsconfig.json type roots
- Fix indentation in vscode-ide-companion package json commands

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request attempts to resolve build failures by addressing TypeScript configuration issues and updating dependencies. However, the PR introduces critical issues with numerous non-existent package versions that will cause build failures rather than fixing them.

Key Changes

  • Adds custom uuid type declaration file and @types/uuid dependencies
  • Updates TypeScript configurations to remove vitest/globals and add typeRoots
  • Fixes FSWatcher test type definition in useGitBranchName.test.ts
  • Upgrades numerous dependencies to versions that don't exist yet (as of January 2025)

Reviewed changes

Copilot reviewed 11 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
types/uuid.d.ts Adds custom type declarations for the uuid module with any types
tsconfig.json Adds typeRoots and removes vitest/globals from types array
packages/vscode-ide-companion/tsconfig.json Adds Node types configuration
packages/vscode-ide-companion/package.json Fixes indentation and adds missing type dependencies
packages/desktop/package.json Upgrades vite to non-existent version 7.2.4
packages/core/tsconfig.json Incorrectly adds "uuid" to types array
packages/core/package.json Adds @types/uuid dependency
packages/cli/tsconfig.json Incorrectly adds "uuid" to types array
packages/cli/src/ui/hooks/useGitBranchName.test.ts Fixes FSWatcher type definition to use ReturnType
packages/cli/package.json Adds uuid runtime dependency and reorders entries
packages/api-server/tsconfig.json Adds Node types configuration
packages/api-server/package.json Upgrades vite and vitest to non-existent versions
package.json Upgrades 20+ dependencies to non-existent future versions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/core/tsconfig.json Outdated
Comment thread packages/cli/tsconfig.json Outdated
rifkybujana and others added 2 commits December 17, 2025 22:49
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 14 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
"@lvce-editor/ripgrep": "^4.1.0",
"simple-git": "^3.30.0",
"strip-ansi": "^7.1.2",
"vite": "^7.2.4"

Copilot AI Dec 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding 'vite' as a runtime dependency in the root package.json is unusual. Vite is typically a build tool. If this is not required for runtime functionality across the monorepo, it should be moved to devDependencies or to the specific packages that need it.

Copilot uses AI. Check for mistakes.
Comment thread packages/cli/package.json
"@types/diff": "^7.0.2",
"@types/dotenv": "^6.1.1",
"@types/lodash-es": "^4.17.12",
"@types/minimatch": "^6.0.0",

Copilot AI Dec 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is version inconsistency for @types/minimatch across the monorepo. The root package.json uses "^5.1.2", packages/core uses "^5.1.2", while packages/cli and packages/vscode-ide-companion use "^6.0.0". This inconsistency can lead to type conflicts in a monorepo. Consider standardizing to a single version across all packages.

Suggested change
"@types/minimatch": "^6.0.0",
"@types/minimatch": "^5.1.2",

Copilot uses AI. Check for mistakes.
"@google/genai": "1.9.0",
"@kolosal-ai/kolosal-ai-core": "file:../core",
"@google/genai": "1.9.0"
"vite": "7.2.4"

Copilot AI Dec 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding 'vite' as a runtime dependency in an API server package is unusual. Vite is typically a build tool used in devDependencies. If this is not used for runtime functionality (like server-side rendering with Vite's SSR), it should be moved to devDependencies to avoid increasing the production bundle size.

Copilot uses AI. Check for mistakes.
"devDependencies": {
"@types/cors": "^2.8.19",
"@types/express": "^5.0.3",
"@types/minimatch": "^6.0.0",

Copilot AI Dec 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is version inconsistency for @types/minimatch across the monorepo. The root package.json uses "^5.1.2", packages/core uses "^5.1.2", while packages/cli and packages/vscode-ide-companion use "^6.0.0". This inconsistency can lead to type conflicts in a monorepo. Consider standardizing to a single version across all packages.

Suggested change
"@types/minimatch": "^6.0.0",
"@types/minimatch": "^5.1.2",

Copilot uses AI. Check for mistakes.
@rifkybujana rifkybujana merged commit f25ca5d into KolosalAI:main Dec 17, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants