From e2d9638b3c93cd41909804bfa127e9b7099b135d Mon Sep 17 00:00:00 2001 From: Aiden Cline Date: Mon, 26 Jan 2026 08:44:29 -0500 Subject: [PATCH] cleanup --- .../src/cli/cmd/tui/routes/session/index.tsx | 21 ++++++++++++++++--- packages/opencode/src/session/instruction.ts | 6 +++++- packages/web/src/content/docs/rules.mdx | 2 +- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx index 2a5a901a21..822c66b203 100644 --- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx @@ -1705,10 +1705,25 @@ function Glob(props: ToolProps) { } function Read(props: ToolProps) { + const { theme } = useTheme() + const loaded = createMemo(() => { + if (props.part.state.status !== "completed") return + if (props.part.state.time.compacted) return + return props.metadata.loaded + }) return ( - - Read {normalizePath(props.input.filePath!)} {input(props.input, ["filePath"])} - + <> + + Read {normalizePath(props.input.filePath!)} {input(props.input, ["filePath"])} + + + + + ↳ Loaded {normalizePath(loaded()!)} + + + + ) } diff --git a/packages/opencode/src/session/instruction.ts b/packages/opencode/src/session/instruction.ts index 436d0b66f1..33db55a20e 100644 --- a/packages/opencode/src/session/instruction.ts +++ b/packages/opencode/src/session/instruction.ts @@ -10,7 +10,11 @@ import type { MessageV2 } from "./message-v2" const log = Log.create({ service: "instruction" }) -const FILES = ["AGENTS.md", "CLAUDE.md", "CONTEXT.md"] +const FILES = [ + "AGENTS.md", + "CLAUDE.md", + "CONTEXT.md", // deprecated +] function globalFiles() { const files = [path.join(Global.Path.config, "AGENTS.md")] diff --git a/packages/web/src/content/docs/rules.mdx b/packages/web/src/content/docs/rules.mdx index 3a170019a7..26e6de9066 100644 --- a/packages/web/src/content/docs/rules.mdx +++ b/packages/web/src/content/docs/rules.mdx @@ -88,7 +88,7 @@ export OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1 # Disable only .claude/skills When opencode starts, it looks for rule files in this order: -1. **Local files** by traversing up from the current directory (`AGENTS.md`, `CLAUDE.md`, or `CONTEXT.md`) +1. **Local files** by traversing up from the current directory (`AGENTS.md`, `CLAUDE.md`) 2. **Global file** at `~/.config/opencode/AGENTS.md` 3. **Claude Code file** at `~/.claude/CLAUDE.md` (unless disabled)