Skip to content

Comments

release/v5.4.9#56

Merged
code-crusher merged 5 commits intomainfrom
release/v5.4.9
Feb 23, 2026
Merged

release/v5.4.9#56
code-crusher merged 5 commits intomainfrom
release/v5.4.9

Conversation

@code-crusher
Copy link
Member

  • rename to Orbital extension
  • feat: prevent duplicate tool calls in streaming responses

- Add tool call signature tracking to detect duplicate executions
- Implement getToolCallSignature() and checkAndRegisterToolCall() methods
- Clear signature cache on new user messages to allow re-execution
- Update presentAssistantMessage to skip duplicate tool calls
- Improve readFileTool to calculate effective limit based on actual file size
@matter-ai-bot
Copy link
Contributor

matter-ai-bot bot commented Feb 23, 2026

Context

Finalizing the Orbital rebranding and ensuring deterministic tool call identification through recursive parameter sorting.

Implementation

Implemented a recursive sortObject helper within Task.ts to ensure getToolCallSignature produces consistent strings regardless of LLM-generated key order. Updated documentation redirects in docusaurus.config.ts and UI links in McpView.tsx to reflect the new Orbital pathing. Enhanced the MCP management UI with custom Delete01Icon and Refresh04Icon components and improved layout spacing.

Summary By MatterAI MatterAI logo

🔄 What Changed

  • Deterministic Signatures: Added recursive key sorting for tool parameters in Task.ts to prevent duplicate calls caused by varying key order.
  • Orbital Rebranding: Updated documentation links and redirects to orbital/features/mcp.
  • UI Refresh: Integrated new custom SVG icons (Delete01Icon, Refresh04Icon) and refined layout styling in the MCP view.

🔍 Impact of the Change

  • Reliability: Eliminates redundant tool executions by ensuring identical parameter sets always generate the same signature.
  • UX/Branding: Provides a cohesive brand experience and a more modern, icon-driven interface for managing MCP servers.

📁 Total Files Changed

Click to Expand
File ChangeLog
apps/kilocode-docs/docusaurus.config.ts Docs Redirect Updated MCP path to Orbital.
src/core/task/Task.ts Key Sorting Added recursive object sorting for signatures.
webview-ui/src/components/mcp/McpView.tsx UI Update Replaced text buttons with icons and updated links.
webview-ui/src/utils/customIcons.tsx New Icons Added SVG definitions for Delete and Refresh.

🧪 Test Added/Recommended

Recommended

  • Unit Test: Validate sortObject with deeply nested objects and arrays to ensure deterministic output.
  • UI Test: Verify that clicking the new Delete and Refresh icons triggers the correct state changes in McpView.

🔒 Security Vulnerabilities

N/A. 🛡️

Screenshots

before after
Text Buttons Icon Buttons

How to Test

  • Open MCP settings and verify documentation links point to /orbital/features/mcp.
  • Observe the new Delete and Refresh icons in the server list.
  • Verify that tool calls with identical parameters but different key orders are correctly identified as duplicates.

Get in Touch

N/A

Copy link
Contributor

@matter-ai-bot matter-ai-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 PR Review is completed: The PR successfully implements the rebranding to 'Orbital' across the codebase. However, there are a few critical issues: a syntax error in a Playwright CSS selector, and a severe logic bug in getToolCallSignature where JSON.stringify strips nested object properties, leading to false-positive duplicate tool call detection.

Skipped files
  • DEVELOPMENT.md: Skipped file pattern
  • README.md: Skipped file pattern
  • apps/kilocode-docs/docs/advanced-usage/custom-rules.md: Skipped file pattern
  • apps/kilocode-docs/docs/advanced-usage/memory-bank.md: Skipped file pattern
  • apps/kilocode-docs/docs/basic-usage/how-tools-work.md: Skipped file pattern
  • apps/kilocode-docs/docs/basic-usage/the-chat-interface.md: Skipped file pattern
  • apps/kilocode-docs/docs/extending/contributing-to-kilo.md: Skipped file pattern
  • apps/kilocode-docs/docs/extending/development-environment.md: Skipped file pattern
  • apps/kilocode-docs/docs/features/checkpoints.md: Skipped file pattern
  • apps/kilocode-docs/docs/features/code-actions.md: Skipped file pattern
  • apps/kilocode-docs/docs/features/mcp/using-mcp-in-kilo-code.md: Skipped file pattern
  • apps/kilocode-docs/docs/getting-started/installing.md: Skipped file pattern
  • apps/kilocode-docs/docs/providers/anthropic.md: Skipped file pattern
  • apps/kilocode-docs/docs/providers/deepseek.md: Skipped file pattern
  • apps/kilocode-docs/docs/providers/fireworks.md: Skipped file pattern
  • apps/kilocode-docs/docs/providers/openai.md: Skipped file pattern
  • apps/kilocode-docs/docs/providers/xai.md: Skipped file pattern
  • apps/kilocode-docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/extending/development-environment.md: Skipped file pattern
  • apps/kilocode-docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/features/code-actions.md: Skipped file pattern
  • apps/kilocode-docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/installing.md: Skipped file pattern
  • apps/kilocode-docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/providers/anthropic.md: Skipped file pattern
  • apps/kilocode-docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/providers/deepseek.md: Skipped file pattern
  • apps/kilocode-docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/providers/fireworks.md: Skipped file pattern
  • apps/kilocode-docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/providers/openai.md: Skipped file pattern
  • apps/kilocode-docs/i18n/zh-CN/docusaurus-theme-classic/navbar.json: Skipped file pattern
  • cli/package.dist.json: Skipped file pattern
  • src/i18n/locales/ar/common.json: Skipped file pattern
  • src/i18n/locales/ca/common.json: Skipped file pattern
  • src/i18n/locales/cs/common.json: Skipped file pattern
  • src/i18n/locales/de/common.json: Skipped file pattern
  • src/i18n/locales/en/common.json: Skipped file pattern
  • src/i18n/locales/es/common.json: Skipped file pattern
  • src/i18n/locales/fr/common.json: Skipped file pattern
  • src/i18n/locales/hi/common.json: Skipped file pattern
  • src/i18n/locales/id/common.json: Skipped file pattern
  • src/i18n/locales/it/common.json: Skipped file pattern
  • src/i18n/locales/ja/common.json: Skipped file pattern
  • src/i18n/locales/ko/common.json: Skipped file pattern
  • src/i18n/locales/nl/common.json: Skipped file pattern
  • src/i18n/locales/pl/common.json: Skipped file pattern
  • src/i18n/locales/pt-BR/common.json: Skipped file pattern
  • src/i18n/locales/ru/common.json: Skipped file pattern
  • src/i18n/locales/th/common.json: Skipped file pattern
  • src/i18n/locales/tr/common.json: Skipped file pattern
  • src/i18n/locales/uk/common.json: Skipped file pattern
  • src/i18n/locales/vi/common.json: Skipped file pattern
  • src/i18n/locales/zh-CN/common.json: Skipped file pattern
  • src/i18n/locales/zh-CN/kilocode.json: Skipped file pattern
  • src/i18n/locales/zh-TW/common.json: Skipped file pattern
  • src/package.nls.ar.json: Skipped file pattern
  • src/package.nls.ca.json: Skipped file pattern
  • src/package.nls.cs.json: Skipped file pattern
  • src/package.nls.de.json: Skipped file pattern
  • src/package.nls.es.json: Skipped file pattern
  • src/package.nls.fr.json: Skipped file pattern
  • src/package.nls.hi.json: Skipped file pattern
  • src/package.nls.id.json: Skipped file pattern
  • src/package.nls.it.json: Skipped file pattern
  • src/package.nls.ja.json: Skipped file pattern
  • src/package.nls.json: Skipped file pattern
  • src/package.nls.ko.json: Skipped file pattern
  • src/package.nls.nl.json: Skipped file pattern
  • src/package.nls.pl.json: Skipped file pattern
  • src/package.nls.pt-BR.json: Skipped file pattern
  • src/package.nls.ru.json: Skipped file pattern
  • src/package.nls.th.json: Skipped file pattern
⬇️ Low Priority Suggestions (1)
cli/src/commands/teams.ts (1 suggestion)

Location: cli/src/commands/teams.ts (Lines 10-10)

🔵 Documentation

Issue: The example in the comment is outdated after the rebranding. "Orbital" would normalize to "orbital", not "kilo-code".

Fix: Update the comment to reflect the correct normalization.

Impact: Improves code documentation accuracy.

-   * Example: "Orbital" -> "kilo-code"
+   * Example: "Orbital" -> "orbital"

Comment on lines 624 to 629
public getToolCallSignature(toolName: string, params: Record<string, unknown>): string {
// Ensure params is an object before sorting keys (defensive against null/undefined from LLM output)
const safeParams = params || {}
const sortedParams = JSON.stringify(safeParams, Object.keys(safeParams).sort())
return `${toolName}:${sortedParams}`
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Logic Error

Issue: Using Object.keys(safeParams).sort() as the replacer array in JSON.stringify will strip all nested object properties that don't share a key name with the top-level object. This causes different tool calls with identical top-level keys but different nested values to generate the exact same signature, leading to false-positive duplicate detection and dropped tool calls.

Fix: Use a recursive sorting function to deterministically sort all keys at all levels before stringifying.

Impact: Prevents valid tool calls from being incorrectly blocked as duplicates.

Suggested change
public getToolCallSignature(toolName: string, params: Record<string, unknown>): string {
// Ensure params is an object before sorting keys (defensive against null/undefined from LLM output)
const safeParams = params || {}
const sortedParams = JSON.stringify(safeParams, Object.keys(safeParams).sort())
return `${toolName}:${sortedParams}`
}
public getToolCallSignature(toolName: string, params: Record<string, unknown>): string {
// Ensure params is an object before sorting keys (defensive against null/undefined from LLM output)
const safeParams = params || {}
const sortObject = (obj: any): any => {
if (obj === null || typeof obj !== "object") return obj
if (Array.isArray(obj)) return obj.map(sortObject)
return Object.keys(obj).sort().reduce((acc, key) => {
acc[key] = sortObject(obj[key])
return acc
}, {} as Record<string, any>)
}
const sortedParams = JSON.stringify(sortObject(safeParams))
return `${toolName}:${sortedParams}`
}

code-crusher and others added 2 commits February 23, 2026 23:41
Co-authored-by: matter-ai-bot[bot] <150888575+matter-ai-bot[bot]@users.noreply.github.com>
Co-authored-by: matter-ai-bot[bot] <150888575+matter-ai-bot[bot]@users.noreply.github.com>
@matter-ai-bot
Copy link
Contributor

matter-ai-bot bot commented Feb 23, 2026

✅ Reviewed the changes: The PR successfully implements the suggested fix for the line counting fallback logic.

1 similar comment
@matter-ai-bot
Copy link
Contributor

matter-ai-bot bot commented Feb 23, 2026

✅ Reviewed the changes: The PR successfully implements the suggested fix for the line counting fallback logic.

…g, improve MCP UI icons

- Update all MCP documentation links from /features/mcp/using-mcp-in-kilo-code to /orbital/features/mcp
- Fix getToolCallSignature to recursively sort object keys for deterministic serialization
- Replace codicon icons with custom Delete01Icon and Refresh04Icon in McpView
- Adjust MCP server list spacing and padding for better UI
- Fix locator selector in vscode-helpers.ts for extension verification
@matter-ai-bot
Copy link
Contributor

matter-ai-bot bot commented Feb 23, 2026

✅ Reviewed the changes: The PR looks good. The deterministic tool call signature generation is implemented correctly with recursive key sorting, and the UI/documentation link updates are straightforward and clean.

@code-crusher code-crusher merged commit 76398a3 into main Feb 23, 2026
5 of 13 checks passed
@code-crusher code-crusher deleted the release/v5.4.9 branch February 23, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant