Skip to content

fix(openclaw-plugin): resolve agentId shadowing and deduplicate utilities#1034

Open
mobilebarn wants to merge 1 commit intovolcengine:mainfrom
mobilebarn:fix/agentid-shadowing-and-cleanup
Open

fix(openclaw-plugin): resolve agentId shadowing and deduplicate utilities#1034
mobilebarn wants to merge 1 commit intovolcengine:mainfrom
mobilebarn:fix/agentid-shadowing-and-cleanup

Conversation

@mobilebarn
Copy link
Copy Markdown

Summary

  • Rename the inner resolveAgentId closure in index.ts to resolveSessionAgentId to prevent shadowing the module-level resolveAgentId from config.ts
  • Fix misleading agentId placeholder/help text in openclaw.plugin.json — the actual default is "default", not a random unique ID
  • Deduplicate md5Short (keep exported in client.ts, import in context-engine.ts)
  • Deduplicate normalizeDedupeText (keep exported in text-utils.ts, import in memory-ranking.ts)

Refs #948

Test plan

  • Verify TypeScript compilation passes with no errors
  • Confirm resolveSessionAgentId is called correctly in before_prompt_build, memory_store, and createMemoryOpenVikingContextEngine
  • Confirm md5Short import in context-engine.ts resolves correctly
  • Confirm normalizeDedupeText import in memory-ranking.ts resolves correctly
  • Verify plugin JSON schema renders correct placeholder/help for agentId

…ties

- Rename inner resolveAgentId to resolveSessionAgentId to prevent
  shadowing the module-level function
- Fix misleading agentId placeholder/help in openclaw.plugin.json
- Deduplicate md5Short (keep in client.ts, import in context-engine.ts)
- Deduplicate normalizeDedupeText (keep in text-utils.ts, import in
  memory-ranking.ts)

Refs volcengine#948
@github-actions
Copy link
Copy Markdown

Failed to generate code suggestions for PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant