feat(local-chat): add local conversation with file attachment support#1149
feat(local-chat): add local conversation with file attachment support#1149coder-zkl1988 wants to merge 2 commits intonexu-io:mainfrom
Conversation
- Auto-create local bot on first launch - File attachment support (images, PDFs with text extraction) - Session management with heartbeat filtering - Spinner UX fix for session loading Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
lefarcen
left a comment
There was a problem hiding this comment.
Hi @zongkelong! π Wow, what an impressive PR for adding local conversation with file attachment supportβthank you for this thoughtful contribution! π The attachment pipeline (PDF extraction + image forwarding), auto-bot creation, and session UX fixes look solid overall.
A few quick thoughts:
- Great use of OpenClaw's trusted
agents/*/attachments/root for persisted filesβmatches media tool policies perfectly. - Preview extraction (first 3 PDF pages) +
pdftool hint is smart context management. - Comprehensive session filtering (subagents/heartbeats/orphans) cleans up the list nicely.
This looks promising. We'll review promptly (target: 24h). Questions or updates? Push here!
Join communities:
- Feishu: https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=90emc2e9-86cd-4723-b455-ca41b70f162d
- Discord: https://discord.gg/nexu
Thanks for making Nexu better!
Nexu Team
|
Hey @zongkelong π Thanks for the screenshot! Looking great. π The local chat implementation looks solid: β
Attachment handling: Smart split β images forward through OpenClaw's native attachment pipeline, PDFs/text extract server-side into β
Session UX: Filtering heartbeats/subagents/orphans keeps the list clean; β
API design: A few thoughts to polish:
Ready for team review! π Questions? Push more here. Join communities:
Thanks! π |
Replaces the raw OpenClaw error ("Agent failed before reply:
No API key found for providerβ¦") with a friendly yellow warning card
that explains the issue in plain language and links directly to
/workspace/settings?tab=providers for easy configuration.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Hey @zongkelong! π Thanks for the push! π Great iteration β local chat looks production-ready: β
Attachment pipeline: Images forward via OpenClaw attachments, PDFs/text extract cleanly to β
Session UX: Orphaned/heartbeat/subagent filtering keeps the list clean; β
API surface: Prior suggestions addressed:
Nit (P3):
We'll merge soon! π Questions? Push here. Join communities:
Thanks! π |

What
Add local conversation (local-chat) feature: auto-creates a local AI bot on first launch, supports file attachments (images + PDFs with text extraction), and improves session management UX.
Why
Users need a local AI chat experience without requiring external service setup. File attachment support (especially PDF text extraction) enables document-based conversations. Fixes session loading spinner and heartbeat session noise.
How
local-bottype in bot schema; controller creates it on first startup if no local bot existsattachment-extractorservice (pdf-parse for PDFs, native preview for images);attachment-storemanages local file persistencechat-routes.ts+chat-service.tshandle session CRUD and message streamingAffected areas
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpassespnpm generate-typesrun (API routes/schemas changed)anytypes introduced (useunknownwith narrowing)Screenshots / recordings
Notes for reviewers
apps/web/src/pages/local-chat.tsxis the primary UI page (~1550 lines)apps/controller/src/services/attachment-extractor.tsusespdf-parsefor PDF text extractionpackages/shared/src/schemas/device-control.tsmay be removed if device-control feature is deferred