Skip to content

Commit 2282174

Browse files
committed
feat: add OPENCODE_FAKE_VCS flag for VCS testing and update todo tracking instructions
1 parent 872c946 commit 2282174

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

packages/opencode/src/flag/flag.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export namespace Flag {
99
export const OPENCODE_DISABLE_LSP_DOWNLOAD = truthy("OPENCODE_DISABLE_LSP_DOWNLOAD")
1010
export const OPENCODE_ENABLE_EXPERIMENTAL_MODELS = truthy("OPENCODE_ENABLE_EXPERIMENTAL_MODELS")
1111
export const OPENCODE_DISABLE_AUTOCOMPACT = truthy("OPENCODE_DISABLE_AUTOCOMPACT")
12+
export const OPENCODE_FAKE_VCS = process.env["OPENCODE_FAKE_VCS"]
1213

1314
// Experimental
1415
export const OPENCODE_EXPERIMENTAL_WATCHER = truthy("OPENCODE_EXPERIMENTAL_WATCHER")

packages/opencode/src/project/project.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import path from "path"
44
import { $ } from "bun"
55
import { Storage } from "../storage/storage"
66
import { Log } from "../util/log"
7+
import { Flag } from "@/flag/flag"
78

89
export namespace Project {
910
const log = Log.create({ service: "project" })
@@ -31,6 +32,7 @@ export namespace Project {
3132
const project: Info = {
3233
id: "global",
3334
worktree: "/",
35+
vcs: Info.shape.vcs.parse(Flag.OPENCODE_FAKE_VCS),
3436
time: {
3537
created: Date.now(),
3638
},

packages/opencode/src/session/prompt/anthropic.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ user: What is the codebase structure?
9393
assistant: [Uses the Task tool]
9494
</example>
9595

96+
IMPORTANT: Always use the TodoWrite tool to plan and track tasks throughout the conversation.
97+
9698
# Code References
9799

98100
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.

0 commit comments

Comments
 (0)