Aiden Cline 2 meses atrás
pai
commit
e2d9638b3c

+ 18 - 3
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

@@ -1705,10 +1705,25 @@ function Glob(props: ToolProps<typeof GlobTool>) {
 }
 
 function Read(props: ToolProps<typeof ReadTool>) {
+  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 (
-    <InlineTool icon="→" pending="Reading file..." complete={props.input.filePath} part={props.part}>
-      Read {normalizePath(props.input.filePath!)} {input(props.input, ["filePath"])}
-    </InlineTool>
+    <>
+      <InlineTool icon="→" pending="Reading file..." complete={props.input.filePath} part={props.part}>
+        Read {normalizePath(props.input.filePath!)} {input(props.input, ["filePath"])}
+      </InlineTool>
+      <Show when={loaded()}>
+        <box paddingLeft={3}>
+          <text paddingLeft={3} fg={theme.textMuted}>
+            ↳ Loaded {normalizePath(loaded()!)}
+          </text>
+        </box>
+      </Show>
+    </>
   )
 }
 

+ 5 - 1
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")]

+ 1 - 1
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)