You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
typechat does not take effect in vscode extension #251
As a result, the package cannot be imported
I manually modified the directory structure of typechat in node_moudles, moved the validate.js file in the typechat/dist/ts directory to the typechat/dist directory, and then used import { createTypeScriptJsonValidator } from "typechat" The problem is solved. Is there a problem with the configuration of tsconfig? Or is there something wrong somewhere else?
I'm not exactly sure what is going wrong (I'm not seeing what error you're hitting) - however, if you are using typechat/ts, my guess is that you need to find a way to bring the original source text of your .ts schema around as an asset. Depending on your bundler, there are different ways to achieve this. In many bundlers (like Vite), you can add ?raw to the path to import the contents as a string.
Activity
7neves commentedon Jun 13, 2024
When I use
When imported, it will become
As a result, the package cannot be imported
I manually modified the directory structure of typechat in node_moudles, moved the
validate.jsfile in thetypechat/dist/tsdirectory to thetypechat/distdirectory, and then usedimport { createTypeScriptJsonValidator } from "typechat"The problem is solved. Is there a problem with the configuration of tsconfig? Or is there something wrong somewhere else?DanielRosenwasser commentedon Jun 18, 2024
I'm not exactly sure what is going wrong (I'm not seeing what error you're hitting) - however, if you are using
typechat/ts, my guess is that you need to find a way to bring the original source text of your.tsschema around as an asset. Depending on your bundler, there are different ways to achieve this. In many bundlers (like Vite), you can add?rawto the path to import the contents as a string.robgruen commentedon Nov 4, 2026
Closing this as stale. Also, please check out #456 , might help.