Skip to content

[Feature & Refactor] Add feishu CLI and enhance context compression#15

Merged
wangxingjun778 merged 4 commits into
mainfrom
feat/core_loop
Jul 13, 2026
Merged

[Feature & Refactor] Add feishu CLI and enhance context compression#15
wangxingjun778 merged 4 commits into
mainfrom
feat/core_loop

Conversation

@wangxingjun778

@wangxingjun778 wangxingjun778 commented Jul 13, 2026

Copy link
Copy Markdown
Member

New Features

  • App Connector: Integrates external platforms (e.g., Feishu/Lark) via REST or CLI backends.
  • Adaptive Context Compression: Optimizes context handling efficiently.
  • Terminal-Aware TUI Resizing: Dynamically adjusts modal layouts based on terminal size.
  • Idempotency Guards: Prevents duplicate execution of side-effect actions.
  • CLI Command Discovery Engine: Automatically discovers commands using CLI help documentation.

Improvements & Bug Fixes

  • Command Parsing Accuracy: Fixed a bug to prevent false-positive command matches (e.g., mistaking /apple for /app).
  • CLI Subprocess Leak Fix: Resolved potential subprocess leaks occurring during timeouts.
  • Null-Safe tool_calls Handling: Fixed a TypeError exception when tool_calls is explicitly set to None.
  • Robust Help Parser: Ensured the CLI help parser no longer terminates prematurely upon encountering blank lines.

…essing

- physically remove _DEFAULT_ALIASES; ToolRegistry now only resolves via
  exact/normalized(canonical) matches, unknown tools get structured
  rejection with suggestions and recovery_hint
- router: structured JSON unknown-tool response instead of bare string,
  dedupe repeated unknown-tool handling branch
- gateway_tool: expose real registered platform actions in prompts and
  capability summaries instead of domain-only hints; unify
  PLATFORM_CONNECT_ACTIONS as single source of truth for schema enum,
  namespace guard and prompt text
- engine/prompts: clarify platform_connect vs platform_action namespace
  boundary, strengthen anti-guessing instructions
- slash_handlers: render actions view from platform_action_capability_summary
- tests: rewrite alias-based tests to assert exact-name execution and
  structured unknown-tool retry behavior; add coverage for
  wrong-namespace/unknown-action/unknown-platform responses

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the App Connector feature to LeapFlow, enabling integrations with external platforms like Feishu/Lark via REST or CLI backends. It includes adaptive context compression, terminal-aware TUI modal resizing, idempotency guards for side-effect actions, and a CLI help-based command discovery engine. The review feedback highlights several critical improvements: preventing false positives in command parsing (e.g., matching /apple as /app), resolving potential subprocess leaks on timeout in the CLI backend, avoiding TypeError exceptions when tool_calls is explicitly None, and ensuring the CLI help parser does not terminate prematurely on blank lines.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/leapflow/cli/commands/interactive.py Outdated
Comment thread src/leapflow/cli/commands/interactive.py Outdated
Comment thread src/leapflow/gateway/backends/cli_backend.py
Comment thread src/leapflow/engine/context_compressor.py Outdated
Comment thread src/leapflow/engine/context_compressor.py Outdated
Comment thread src/leapflow/gateway/connectors/cli_discovery.py
Comment thread src/leapflow/gateway/connectors/cli_discovery.py
@wangxingjun778 wangxingjun778 merged commit e95be03 into main Jul 13, 2026
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