mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
d7c0205052
* Add comprehensive documentation for PicoClaw configuration, chat applications, debugging, Docker setup, async tasks, and troubleshooting on MY language: - Introduced a new document on MY language for chat applications configuration detailing setup for Telegram, Discord, WhatsApp, and others. - Created a configuration guide on MY language outlining environment variables, workspace structure, and security settings. - Added a debugging section to assist users in troubleshooting and understanding agent interactions on MY language. - Provided a Docker guide on MY language for easy deployment using Docker Compose. - Documented the use of spawn on MY language for asynchronous tasks and how to configure heartbeat settings. - Included a troubleshooting section on MY language for common model-related errors. * docs: add Malay language support to documentation * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
62 lines
1.9 KiB
Markdown
62 lines
1.9 KiB
Markdown
# 🔄 Spawn & Tugasan Async
|
|
|
|
> Kembali ke [README](../../README.my.md)
|
|
|
|
## Tugasan Cepat (balas terus)
|
|
|
|
- Laporkan masa semasa
|
|
|
|
## Tugasan Panjang (guna spawn untuk async)
|
|
|
|
- Cari berita AI di web dan ringkaskan
|
|
- Semak e-mel dan laporkan mesej penting
|
|
```
|
|
|
|
**Tingkah laku utama:**
|
|
|
|
| Feature | Description |
|
|
| ----------------------- | --------------------------------------------------------- |
|
|
| **spawn** | Mencipta sub-agen async, tidak menyekat heartbeat |
|
|
| **Independent context** | Sub-agen mempunyai konteks sendiri, tiada sejarah sesi |
|
|
| **message tool** | Sub-agen berkomunikasi terus dengan pengguna melalui message tool |
|
|
| **Non-blocking** | Selepas spawn, heartbeat terus ke tugasan seterusnya |
|
|
|
|
#### Cara Komunikasi Sub-agen Berfungsi
|
|
|
|
```
|
|
Heartbeat dicetuskan
|
|
↓
|
|
Agen membaca HEARTBEAT.md
|
|
↓
|
|
Untuk tugasan panjang: spawn sub-agen
|
|
↓ ↓
|
|
Terus ke tugasan seterusnya Sub-agen bekerja secara bebas
|
|
↓ ↓
|
|
Semua tugasan selesai Sub-agen menggunakan tool "message"
|
|
↓ ↓
|
|
Balas HEARTBEAT_OK Pengguna menerima hasil secara terus
|
|
```
|
|
|
|
Sub-agen mempunyai akses kepada tools (message, web_search, dan sebagainya) dan boleh berkomunikasi dengan pengguna secara bebas tanpa melalui agen utama.
|
|
|
|
**Konfigurasi:**
|
|
|
|
```json
|
|
{
|
|
"heartbeat": {
|
|
"enabled": true,
|
|
"interval": 30
|
|
}
|
|
}
|
|
```
|
|
|
|
| Option | Default | Description |
|
|
| ---------- | ------- | ---------------------------------------- |
|
|
| `enabled` | `true` | Hidupkan/matikan heartbeat |
|
|
| `interval` | `30` | Selang semakan dalam minit (minimum: 5) |
|
|
|
|
**Pemboleh ubah persekitaran:**
|
|
|
|
* `PICOCLAW_HEARTBEAT_ENABLED=false` untuk nyahaktifkan
|
|
* `PICOCLAW_HEARTBEAT_INTERVAL=60` untuk menukar selang
|