summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-10-28 02:54:23 -0400
committerDax Raad <[email protected]>2025-10-28 02:54:29 -0400
commit22821744ef54ea9f8a4b27f62b55e74569ef8913 (patch)
treec173d165d05768362f467a5852526114363130aa
parent872c9467b2b078019ad5a5e01906a67bdc6ce953 (diff)
downloadopencode-22821744ef54ea9f8a4b27f62b55e74569ef8913.tar.gz
opencode-22821744ef54ea9f8a4b27f62b55e74569ef8913.zip
feat: add OPENCODE_FAKE_VCS flag for VCS testing and update todo tracking instructions
-rw-r--r--packages/opencode/src/flag/flag.ts1
-rw-r--r--packages/opencode/src/project/project.ts2
-rw-r--r--packages/opencode/src/session/prompt/anthropic.txt2
3 files changed, 5 insertions, 0 deletions
diff --git a/packages/opencode/src/flag/flag.ts b/packages/opencode/src/flag/flag.ts
index fff271cd2..879aa758a 100644
--- a/packages/opencode/src/flag/flag.ts
+++ b/packages/opencode/src/flag/flag.ts
@@ -9,6 +9,7 @@ export namespace Flag {
export const OPENCODE_DISABLE_LSP_DOWNLOAD = truthy("OPENCODE_DISABLE_LSP_DOWNLOAD")
export const OPENCODE_ENABLE_EXPERIMENTAL_MODELS = truthy("OPENCODE_ENABLE_EXPERIMENTAL_MODELS")
export const OPENCODE_DISABLE_AUTOCOMPACT = truthy("OPENCODE_DISABLE_AUTOCOMPACT")
+ export const OPENCODE_FAKE_VCS = process.env["OPENCODE_FAKE_VCS"]
// Experimental
export const OPENCODE_EXPERIMENTAL_WATCHER = truthy("OPENCODE_EXPERIMENTAL_WATCHER")
diff --git a/packages/opencode/src/project/project.ts b/packages/opencode/src/project/project.ts
index 34bd4aea7..339efc2cb 100644
--- a/packages/opencode/src/project/project.ts
+++ b/packages/opencode/src/project/project.ts
@@ -4,6 +4,7 @@ import path from "path"
import { $ } from "bun"
import { Storage } from "../storage/storage"
import { Log } from "../util/log"
+import { Flag } from "@/flag/flag"
export namespace Project {
const log = Log.create({ service: "project" })
@@ -31,6 +32,7 @@ export namespace Project {
const project: Info = {
id: "global",
worktree: "/",
+ vcs: Info.shape.vcs.parse(Flag.OPENCODE_FAKE_VCS),
time: {
created: Date.now(),
},
diff --git a/packages/opencode/src/session/prompt/anthropic.txt b/packages/opencode/src/session/prompt/anthropic.txt
index 4f377beb9..43b11250a 100644
--- a/packages/opencode/src/session/prompt/anthropic.txt
+++ b/packages/opencode/src/session/prompt/anthropic.txt
@@ -93,6 +93,8 @@ user: What is the codebase structure?
assistant: [Uses the Task tool]
</example>
+IMPORTANT: Always use the TodoWrite tool to plan and track tasks throughout the conversation.
+
# Code References
When referencing specific functions or pieces of code include the pattern `file_path:line_number` to allow the user to easily navigate to the source code location.