Skip to content

Commit 4d3a72a

Browse files
Merge pull request #44 from reddb-io/afk/39-finish-redcode-identity-and-make-session
resume: #39
2 parents c10ab0c + 6471136 commit 4d3a72a

45 files changed

Lines changed: 211 additions & 113 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"opencode": patch
3+
---
4+
5+
Finish Redcode branding across terminal surfaces and keep generated session titles focused on user intent instead of unsupported repository findings.

‎packages/opencode/src/agent/prompt/title.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Your output must be:
1616
- Title must be grammatically correct and read naturally - no word salad
1717
- Never include tool names in the title (e.g. "read tool", "bash tool", "edit tool")
1818
- Focus on the main topic or question the user needs to retrieve
19+
- Write a neutral conversation label, not a status report, conclusion, or repository health finding
20+
- Describe only the user's stated intent, request, question, or topic
21+
- Never claim that a problem was found, detected, fixed, verified, or diagnosed unless the user explicitly stated that outcome
22+
- Do not infer bugs, vulnerabilities, failures, or other repository conditions from a request to inspect or change something
1923
- Vary your phrasing - avoid repetitive patterns like always starting with "Analyzing"
2024
- When a file is mentioned, focus on WHAT the user wants to do WITH the file, not just that they shared it
2125
- Keep exact: technical terms, numbers, filenames, HTTP codes

‎packages/opencode/src/cli/cmd/attach.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ServerAuth } from "@/server/auth"
66

77
export const AttachCommand = cmd({
88
command: "attach <url>",
9-
describe: "attach to a running opencode server",
9+
describe: "attach to a running Redcode server",
1010
builder: (yargs) =>
1111
yargs
1212
.positional("url", {

‎packages/opencode/src/cli/cmd/debug/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const InfoCommand = effectCmd({
6060
: undefined
6161
const terminal = [termProgram, process.env.TERM].filter((item): item is string => Boolean(item)).join(" / ")
6262

63-
console.log(`opencode version: ${InstallationVersion}`)
63+
console.log(`Redcode version: ${InstallationVersion}`)
6464
console.log(`os: ${os.type()} ${os.release()} ${os.arch()}`)
6565
console.log(`terminal: ${terminal || "unknown"}`)
6666
console.log("plugins:")

‎packages/opencode/src/cli/cmd/mcp.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export const McpListCommand = effectCmd({
119119

120120
if (servers.length === 0) {
121121
prompts.log.warn("No MCP servers configured")
122-
prompts.outro("Add servers with: opencode mcp add")
122+
prompts.outro("Add servers with: redcode mcp add")
123123
return
124124
}
125125

@@ -563,7 +563,7 @@ export const McpAddCommand = effectCmd({
563563
if (type === "local") {
564564
const command = await prompts.text({
565565
message: "Enter command to run",
566-
placeholder: "e.g., opencode x @modelcontextprotocol/server-filesystem",
566+
placeholder: "e.g., redcode x @modelcontextprotocol/server-filesystem",
567567
validate: (x) => (x && x.length > 0 ? undefined : "Required"),
568568
})
569569
if (prompts.isCancel(command)) throw new UI.CancelledError()

‎packages/opencode/src/cli/cmd/pr.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Process } from "@/util/process"
77

88
export const PrCommand = effectCmd({
99
command: "pr <number>",
10-
describe: "fetch and checkout a GitHub PR branch, then run opencode",
10+
describe: "fetch and checkout a GitHub PR branch, then run Redcode",
1111
builder: (yargs) =>
1212
yargs.positional("number", {
1313
type: "number",
@@ -76,11 +76,11 @@ export const PrCommand = effectCmd({
7676
const sessionMatch = prInfo.body.match(/https:\/\/opncd\.ai\/s\/([a-zA-Z0-9_-]+)/)
7777
if (sessionMatch) {
7878
const sessionUrl = sessionMatch[0]
79-
UI.println(`Found opencode session: ${sessionUrl}`)
79+
UI.println(`Found Redcode session: ${sessionUrl}`)
8080
UI.println(`Importing session...`)
8181

8282
const importResult = yield* Effect.promise(() =>
83-
Process.text(["opencode", "import", sessionUrl], { nothrow: true }),
83+
Process.text(["redcode", "import", sessionUrl], { nothrow: true }),
8484
)
8585
if (importResult.code === 0) {
8686
const sessionIdMatch = importResult.text.trim().match(/Imported session: ([a-zA-Z0-9_-]+)/)
@@ -95,13 +95,13 @@ export const PrCommand = effectCmd({
9595

9696
UI.println(`Successfully checked out PR #${prNumber} as branch '${localBranchName}'`)
9797
UI.println()
98-
UI.println("Starting opencode...")
98+
UI.println("Starting Redcode...")
9999
UI.println()
100100

101101
const opencodeArgs = sessionId ? ["-s", sessionId] : []
102102
const code = yield* Effect.promise(
103103
() =>
104-
Process.spawn(["opencode", ...opencodeArgs], {
104+
Process.spawn(["redcode", ...opencodeArgs], {
105105
stdin: "inherit",
106106
stdout: "inherit",
107107
stderr: "inherit",
@@ -110,6 +110,6 @@ export const PrCommand = effectCmd({
110110
)
111111
// Match legacy throw semantics — propagate as a defect so the top-level
112112
// index.ts catch handles it identically (exit 1, "Unexpected error" banner).
113-
if (code !== 0) return yield* Effect.die(new Error(`opencode exited with code ${code}`))
113+
if (code !== 0) return yield* Effect.die(new Error(`Redcode exited with code ${code}`))
114114
}),
115115
})

‎packages/opencode/src/cli/cmd/providers.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ export const ProvidersLoginCommand = effectCmd({
304304
builder: (yargs: Argv) =>
305305
yargs
306306
.positional("url", {
307-
describe: "opencode auth provider",
307+
describe: "provider authentication URL",
308308
type: "string",
309309
})
310310
.option("provider", {

‎packages/opencode/src/cli/cmd/run.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ async function toolError(part: ToolPart) {
126126

127127
export const RunCommand = effectCmd({
128128
command: "run [message..]",
129-
describe: "run opencode with a message",
129+
describe: "run Redcode with a message",
130130
// --attach connects to a remote server (no local instance needed); the
131131
// default path runs an in-process server and needs the project instance.
132132
instance: (args) => !args.attach,
@@ -190,7 +190,7 @@ export const RunCommand = effectCmd({
190190
})
191191
.option("attach", {
192192
type: "string",
193-
describe: "attach to a running opencode server (e.g., http://localhost:4096)",
193+
describe: "attach to a running Redcode server (e.g., http://localhost:4096)",
194194
})
195195
.option("password", {
196196
alias: ["p"],

‎packages/opencode/src/cli/cmd/run/footer.permission.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export function RejectField(props: {
100100
minHeight={1}
101101
maxHeight={3}
102102
wrapMode="word"
103-
placeholder="Tell OpenCode what to do differently"
103+
placeholder="Tell Redcode what to do differently"
104104
placeholderColor={props.theme.muted}
105105
textColor={props.theme.text}
106106
focusedTextColor={props.theme.text}
@@ -284,7 +284,7 @@ export function RunPermissionBody(props: {
284284
</Match>
285285
<Match when={state().stage === "reject"}>
286286
<box paddingLeft={1}>
287-
<text fg={props.theme.muted}>Tell OpenCode what to do differently</text>
287+
<text fg={props.theme.muted}>Tell Redcode what to do differently</text>
288288
</box>
289289
</Match>
290290
</Switch>

‎packages/opencode/src/cli/cmd/run/footer.prompt.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ export function createPromptState(input: PromptInput): PromptState {
417417
description: "compose in your external editor",
418418
} satisfies SlashOption,
419419
{ kind: "slash", name: "new", display: "/new", description: "start a new session" } satisfies SlashOption,
420-
{ kind: "slash", name: "exit", display: "/exit", description: "close OpenCode" } satisfies SlashOption,
420+
{ kind: "slash", name: "exit", display: "/exit", description: "close Redcode" } satisfies SlashOption,
421421
]
422422
const hidden = new Set(builtins.map((item) => item.name))
423423
const showSkillMenu = !shell() && skillCommands().length > 0 && !hasSkillsCommand()

0 commit comments

Comments
 (0)