Skip to content

feat: fix feishu channel reload failed#1817

Merged
rayrayraykk merged 2 commits intoagentscope-ai:mainfrom
rayrayraykk:weirui/dev/fix_feishu
Mar 19, 2026
Merged

feat: fix feishu channel reload failed#1817
rayrayraykk merged 2 commits intoagentscope-ai:mainfrom
rayrayraykk:weirui/dev/fix_feishu

Conversation

@rayrayraykk
Copy link
Member

Description

[Describe what this PR does and why]

Related Issue: Fixes #(issue_number) or Relates to #(issue_number)

Security Considerations: [If applicable, e.g. channel auth, env/config handling]

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactoring

Component(s) Affected

  • Core / Backend (app, agents, config, providers, utils, local_models)
  • Console (frontend web UI)
  • Channels (DingTalk, Feishu, QQ, Discord, iMessage, etc.)
  • Skills
  • CLI
  • Documentation (website)
  • Tests
  • CI/CD
  • Scripts / Deploy

Checklist

  • I ran pre-commit run --all-files locally and it passes
  • If pre-commit auto-fixed files, I committed those changes and reran checks
  • I ran tests locally (pytest or as relevant) and they pass
  • Documentation updated (if needed)
  • Ready for review

Testing

[How to test these changes]

Local Verification Evidence

pre-commit run --all-files
# paste summary result

pytest
# paste summary result

Additional Notes

[Optional: any other context]

Copilot AI review requested due to automatic review settings March 19, 2026 02:48
@rayrayraykk rayrayraykk temporarily deployed to maintainer-approved March 19, 2026 02:48 — with GitHub Actions Inactive
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses Feishu channel reload/shutdown stability by making the WebSocket client run on a per-thread event loop and adding cleanup/guards to avoid using a closed loop during reload.

Changes:

  • Track a dedicated WebSocket thread event loop (_ws_loop) and restore lark_oapi.ws.client.loop after the thread exits.
  • Add a _closed flag to drop incoming WS messages during shutdown.
  • Update stop() to stop the WS event loop and add a warning when the WS thread does not terminate within the timeout.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rayrayraykk rayrayraykk merged commit 9896fe3 into agentscope-ai:main Mar 19, 2026
37 checks passed
futuremeng pushed a commit to futuremeng/CoPaw that referenced this pull request Mar 19, 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.

[Bug]: 飞书,通道存在文件残留,无法对话情况 [Bug]: 飞书不回复消息 0.1.0b3版本

3 participants