agentscope-ai / agentscope-ai/QwenPaw

[Feature]: Allow agent to send clickable folder/file path buttons in chat

Aperta
#6,466 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Python
Stelle
34.9k
Fork
3.1k
Merge medio
1g 15h
PR unite (30g)
225

Descrizione

## Summary

When an agent in QwenPaw Desktop responds with a file path or folder path (e.g., `C:\Users\`), the user currently has to manually copy the path and paste it into File Explorer. It would be much more convenient if the agent could output a clickable button that opens the folder or file directly in Windows Explorer.

## Proposed Feature

Allow the agent to generate a button (or inline link) in the chat that, when clicked, opens the specified folder or file in the native file manager. The button should include a folder emoji 📁 to make it visually clear.

Example of desired output in chat:

📁 Open folder

Clicking this button would run:
explorer C:\Users\

## Why This Matters

- Saves users time — no more copying paths and opening Explorer manually
- Reduces friction when the agent guides users to specific files or directories
- Makes the Desktop experience feel more native and polished

## Implementation Ideas

1. The backend could return a special structured reply (e.g., `{"type": "open_path", "path": "..."}`).
2. The frontend renders it as a clickable button with a 📁 emoji.
3. On click, frontend calls a small internal API like `POST /api/shell/open` or uses a custom protocol like `qwenpaw://open-path/...` that launches `explorer.exe /select,"path"` on Windows (and equivalent on macOS/Linux).
4. A confirmation/safety prompt could appear first to prevent abuse.

## Additional Context

- Windows: use `explorer` command or `start` command
- macOS: use `open` command
- Linux: use `xdg-open` command
- Security: the button should only appear for paths within allowed directories (e.g., under `WORKING_DIR`)

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.