Fix "npm:" being imported on the client

Merged
Opened by stevekrouse
4/14/2025

The core of the issue was that I needed to include the following in Townie's system prompt: https://www.val.town/x/stevekrouse/OpenTownie/branch/main/history/prompts/system_prompt.txt?v=1003

I just tested it and it seems like it gets the idea now: https://www.val.town/x/stevekrouse/asdf/branch/main/code/index.tsx

I solved the issue in your app simply by removing the "view source" url, but now that Townie has the right prompt, you can ask it to add it back in.

I also simplified your HTTP handler by using the serveFile function, which already adds the right MIME type.

3 files changed
+25
-83

Pull request merged