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

推荐订阅源

D
Docker
博客园 - 三生石上(FineUI控件)
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
腾讯CDC
酷 壳 – CoolShell
酷 壳 – CoolShell
M
MIT News - Artificial intelligence
Stack Overflow Blog
Stack Overflow Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Jina AI
Jina AI
爱范儿
爱范儿
博客园 - 【当耐特】
雷峰网
雷峰网
S
SegmentFault 最新的问题
美团技术团队
Blog — PlanetScale
Blog — PlanetScale
The GitHub Blog
The GitHub Blog
有赞技术团队
有赞技术团队
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
J
Java Code Geeks

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
refactor(oc-path): drop unused repack helper · openclaw/o...
vincentkoc · 2026-06-20 · via Recent Commits to openclaw:main

File tree

  • extensions/oc-path/src/oc-path

Original file line numberDiff line numberDiff line change

@@ -65,7 +65,7 @@ export {

6565
6666

// `evaluatePredicate`, `getPathLayout`, `parseOrdinalSeg`,

6767

// `parsePredicateSeg`, `parseUnionSeg`, `quoteSeg`, `unquoteSeg`,

68-

// `repackPath`, `resolvePositionalSeg`, `splitRespectingBrackets`

68+

// `resolvePositionalSeg`, `splitRespectingBrackets`

6969

// were exported from earlier prototypes. They're substrate-internal

7070

// helpers — used by `find.ts`, the per-kind resolvers, and the parser

7171

// itself, but not part of the upstream-portable public surface.

Original file line numberDiff line numberDiff line change

@@ -546,7 +546,7 @@ export interface PathSegmentLayout {

546546
547547

export function getPathLayout(path: OcPath): PathSegmentLayout {

548548

// Quote-aware split — `.split('.')` would shred a quoted segment

549-

// containing a literal `.` (e.g. `"a.b"`) and break repackPath.

549+

// containing a literal `.` (e.g. `"a.b"`).

550550

const sectionSubs = path.section === undefined ? [] : splitRespectingBrackets(path.section, ".");

551551

const itemSubs = path.item === undefined ? [] : splitRespectingBrackets(path.item, ".");

552552

const fieldSubs = path.field === undefined ? [] : splitRespectingBrackets(path.field, ".");

@@ -558,31 +558,6 @@ export function getPathLayout(path: OcPath): PathSegmentLayout {

558558

};

559559

}

560560
561-

/**

562-

* Re-pack a concrete sub-segment list into an `OcPath` preserving the

563-

* pattern's slot boundaries. Throws on length mismatch.

564-

*/

565-

export function repackPath(pattern: OcPath, subs: readonly string[]): OcPath {

566-

const layout = getPathLayout(pattern);

567-

if (subs.length !== layout.subs.length) {

568-

fail(

569-

`repack length mismatch: pattern has ${layout.subs.length} sub-segments, got ${subs.length}`,

570-

formatOcPath(pattern),

571-

"OC_PATH_REPACK_LENGTH",

572-

);

573-

}

574-

const sectionSubs = subs.slice(0, layout.sectionLen);

575-

const itemSubs = subs.slice(layout.sectionLen, layout.sectionLen + layout.itemLen);

576-

const fieldSubs = subs.slice(layout.sectionLen + layout.itemLen);

577-

return {

578-

file: pattern.file,

579-

...(sectionSubs.length > 0 ? { section: sectionSubs.join(".") } : {}),

580-

...(itemSubs.length > 0 ? { item: itemSubs.join(".") } : {}),

581-

...(fieldSubs.length > 0 ? { field: fieldSubs.join(".") } : {}),

582-

...(pattern.session !== undefined ? { session: pattern.session } : {}),

583-

};

584-

}

585-
586561

function extractSession(queryPart: string, input: string): string | undefined {

587562

if (queryPart.length === 0) {

588563

return undefined;