惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
Martin Fowler
Martin Fowler
爱范儿
爱范儿
IT之家
IT之家
Last Week in AI
Last Week in AI
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
aimingoo的专栏
aimingoo的专栏
G
Google Developers Blog
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队
The Cloudflare Blog
MyScale Blog
MyScale Blog
T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
腾讯CDC
Microsoft Security Blog
Microsoft Security Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(docs): show inline read_when hints in docs:list (#952...
hugenshen · 2026-06-22 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -116,6 +116,11 @@ function extractMetadata(fullPath) {

116116

} catch {

117117

// ignore malformed inline arrays

118118

}

119+

} else if (

120+

(inline.startsWith('"') && inline.endsWith('"')) ||

121+

(inline.startsWith("'") && inline.endsWith("'"))

122+

) {

123+

readWhen.push(...compactStrings([inline.slice(1, -1)]));

119124

}

120125

continue;

121126

}

Original file line numberDiff line numberDiff line change

@@ -1026,6 +1026,7 @@ const TOOLING_SOURCE_TEST_TARGETS = new Map([

10261026

"scripts/deadcode-unused-files.allowlist.mjs",

10271027

["test/scripts/check-deadcode-unused-files.test.ts"],

10281028

],

1029+

["scripts/docs-list.js", ["test/scripts/docs-list.test.ts"]],

10291030

["scripts/docs-link-audit.mjs", ["src/scripts/docs-link-audit.test.ts"]],

10301031

["scripts/lib/arg-utils.mjs", ["test/scripts/arg-utils.test.ts"]],

10311032

[

Original file line numberDiff line numberDiff line change

@@ -887,6 +887,7 @@ describe("test-projects args", () => {

887887

"test/scripts/codex-install-assertions.test.ts",

888888

"test/scripts/config-reload-mutate-metadata.test.ts",

889889

"test/scripts/control-ui-i18n.test.ts",

890+

"test/scripts/docs-list.test.ts",

890891

"test/scripts/doctor-install-switch-wrapper.test.ts",

891892

"test/scripts/e2e-text-file-utils.test.ts",

892893

"test/scripts/fixture-common.test.ts",

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,46 @@

1+

// docs-list tests cover source docs metadata discovery for docs-aware tooling.

2+

import { execFileSync } from "node:child_process";

3+

import { mkdirSync, writeFileSync } from "node:fs";

4+

import path from "node:path";

5+

import { afterEach, describe, expect, it } from "vitest";

6+

import { cleanupTempDirs, makeTempDir } from "../helpers/temp-dir.js";

7+
8+

const tempDirs: string[] = [];

9+

const repoRoot = path.resolve(import.meta.dirname, "../..");

10+

const docsListScriptPath = path.join(repoRoot, "scripts", "docs-list.js");

11+
12+

function makeTempRepoRoot(prefix: string): string {

13+

return makeTempDir(tempDirs, prefix);

14+

}

15+
16+

function runDocsList(cwd: string): string {

17+

return execFileSync(process.execPath, [docsListScriptPath], {

18+

cwd,

19+

encoding: "utf8",

20+

});

21+

}

22+
23+

afterEach(() => {

24+

cleanupTempDirs(tempDirs);

25+

});

26+
27+

describe("docs-list", () => {

28+

it("prints single-line read_when strings as read hints", () => {

29+

const tempRepoRoot = makeTempRepoRoot("openclaw-docs-list-");

30+

mkdirSync(path.join(tempRepoRoot, "docs"), { recursive: true });

31+

writeFileSync(

32+

path.join(tempRepoRoot, "docs", "page.md"),

33+

`---

34+

summary: "Single-line read_when page"

35+

read_when: "Read this page when the hint is inline."

36+

---

37+

`,

38+

"utf8",

39+

);

40+
41+

const output = runDocsList(tempRepoRoot);

42+
43+

expect(output).toContain("page.md - Single-line read_when page");

44+

expect(output).toContain("Read when: Read this page when the hint is inline.");

45+

});

46+

});

Original file line numberDiff line numberDiff line change

@@ -1389,6 +1389,11 @@ describe("scripts/test-projects changed-target routing", () => {

13891389

targets: ["test/scripts/update-clawtributors.test.ts"],

13901390

});

13911391
1392+

expect(resolveChangedTestTargetPlan(["scripts/docs-list.js"])).toEqual({

1393+

mode: "targets",

1394+

targets: ["test/scripts/docs-list.test.ts"],

1395+

});

1396+
13921397

expect(resolveChangedTestTargetPlan(["scripts/docs-link-audit.mjs"])).toEqual({

13931398

mode: "targets",

13941399

targets: ["src/scripts/docs-link-audit.test.ts"],