Skip to content

Commit

Permalink
make it work for open source
Browse files Browse the repository at this point in the history
  • Loading branch information
arvid220u committed Feb 18, 2024
1 parent cb2837f commit d80100c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ commit.patch
commit.template
.wireit
target/
*.tsbuildinfo

# todo: we should figure out a good way to sync these with the internal repo instead of having to generate them with the init script
Cargo.lock
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"changeProcessCWD": true
}
],
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features",
"editor.insertSpaces": false,
"editor.formatOnSave": true
},
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features",
"editor.insertSpaces": false,
Expand Down
2 changes: 1 addition & 1 deletion priompt-preview/scripts/serve.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const requestListener = (req, res) => {
data = data.toString().replace(/PRIOMPT_PREVIEW_OPENAI_KEY/g, `${process.env.PRIOMPT_PREVIEW_OPENAI_KEY}`);
}
if ((extname === '.html' || extname === '.js') && data.toString().includes('PRIOMPT_PREVIEW_OSS_ENDPOINTS_JSON_STRING')) {
data = data.toString().replace(/PRIOMPT_PREVIEW_OSS_ENDPOINTS_JSON_STRING/g, `${process.env.PRIOMPT_PREVIEW_OSS_ENDPOINTS_JSON_STRING}`);
data = data.toString().replace(/PRIOMPT_PREVIEW_OSS_ENDPOINTS_JSON_STRING/g, `${process.env.PRIOMPT_PREVIEW_OSS_ENDPOINTS_JSON_STRING ?? "PRIOMPT_PREVIEW_OSS_ENDPOINTS_JSON_STRING"}`);
}
res.end(data);
}
Expand Down

0 comments on commit d80100c

Please sign in to comment.