Replies: 1 comment
-
Fixed via #15655 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm running Theia
1.60.2
in a downstream project with"strict": true
(in particular,strictFunctionTypes
). Everything compiles fine in Theia's own build, but enabling strict mode in Theia triggers this error inpackages/ai-chat/src/common/chat-agents.ts
:Context
ToolRequest
definestheia/packages/ai-core/src/common/language-model.ts
Line 93 in 88ca7f4
ChatToolRequest
narrows that totheia/packages/ai-chat/src/common/chat-tool-request-service.ts
Lines 22 to 25 in 88ca7f4
strictFunctionTypes
enforces contravariance, so parameter type cannot be tightened when extending.Questions
Should
ai-chat
(maybe Theia) be compiled withstrictFunctionTypes: true
upstream, or does Theia expect downstream apps to disable it?Would you consider widening the
ChatToolRequest.handler
signature to matchToolRequest
and casting the context in the client code?:In the meantime, is it correct to ignore or cast this error in downstream Theia projects with strict compiler options?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions