Skip to content

Commit 88d6586

Browse files
committed
Fix app launch
1 parent a2de724 commit 88d6586

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"type": "extensionHost",
1111
"request": "launch",
1212
"runtimeExecutable": "${execPath}",
13-
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
13+
"args": ["--extensionDevelopmentPath=${workspaceFolder}/src"],
1414
"sourceMaps": true,
15-
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
15+
"outFiles": ["${workspaceFolder}/src/dist/**/*.js"],
1616
"preLaunchTask": "${defaultBuildTask}",
1717
"env": {
1818
"NODE_ENV": "development",

webview-ui/vite.config.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,26 +57,26 @@ function getGitSha() {
5757
export default defineConfig(({ mode }) => {
5858
let outDir = "../src/webview-ui/build"
5959

60+
const pkg = JSON.parse(fs.readFileSync("../src/package.json", "utf8"))
61+
const gitSha = getGitSha()
62+
6063
const define: Record<string, any> = {
6164
"process.platform": JSON.stringify(process.platform),
65+
"process.env.VSCODE_TEXTMATE_DEBUG": JSON.stringify(process.env.VSCODE_TEXTMATE_DEBUG),
66+
"process.env.PKG_NAME": JSON.stringify(pkg.name),
67+
"process.env.PKG_VERSION": JSON.stringify(pkg.version),
68+
"process.env.PKG_OUTPUT_CHANNEL": JSON.stringify("Roo-Code"),
69+
...(gitSha ? { "process.env.PKG_SHA": JSON.stringify(gitSha) } : {}),
6270
}
6371

6472
// TODO: We can use `@roo-code/build` to generate `define` once the
6573
// monorepo is deployed.
6674
if (mode === "nightly") {
6775
outDir = "../apps/vscode-nightly/build/webview-ui/build"
68-
69-
const { name, version } = JSON.parse(fs.readFileSync("../apps/vscode-nightly/package.nightly.json", "utf8"))
70-
71-
define["process.env.PKG_NAME"] = JSON.stringify(name)
72-
define["process.env.PKG_VERSION"] = JSON.stringify(version)
76+
const nightlyPkg = JSON.parse(fs.readFileSync("../apps/vscode-nightly/package.nightly.json", "utf8"))
77+
define["process.env.PKG_NAME"] = JSON.stringify(nightlyPkg.name)
78+
define["process.env.PKG_VERSION"] = JSON.stringify(nightlyPkg.version)
7379
define["process.env.PKG_OUTPUT_CHANNEL"] = JSON.stringify("Roo-Code-Nightly")
74-
75-
const gitSha = getGitSha()
76-
77-
if (gitSha) {
78-
define["process.env.PKG_SHA"] = JSON.stringify(gitSha)
79-
}
8080
}
8181

8282
return {

0 commit comments

Comments
 (0)