heyio 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -187,14 +187,15 @@ async function executeOnSession(prompt, callback) {
|
|
|
187
187
|
const session = await ensureOrchestratorSession();
|
|
188
188
|
let accumulated = "";
|
|
189
189
|
const unsubDelta = session.on("assistant.message_delta", (event) => {
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
const delta = event.data.deltaContent;
|
|
191
|
+
accumulated += delta;
|
|
192
|
+
callback(delta, false);
|
|
192
193
|
});
|
|
193
194
|
try {
|
|
194
195
|
const result = await session.sendAndWait({ prompt }, SEND_TIMEOUT_MS);
|
|
195
196
|
unsubDelta();
|
|
196
197
|
const finalText = result?.data.content ?? accumulated;
|
|
197
|
-
callback(
|
|
198
|
+
callback("", true);
|
|
198
199
|
return finalText;
|
|
199
200
|
}
|
|
200
201
|
catch (err) {
|
|
@@ -202,7 +203,7 @@ async function executeOnSession(prompt, callback) {
|
|
|
202
203
|
// If we accumulated partial text, return it gracefully on timeout
|
|
203
204
|
if (accumulated && err instanceof Error && err.message.includes("timeout")) {
|
|
204
205
|
console.error("[io] Session sendAndWait timed out, returning partial response");
|
|
205
|
-
callback(
|
|
206
|
+
callback("", true);
|
|
206
207
|
return accumulated;
|
|
207
208
|
}
|
|
208
209
|
// Session-level errors: invalidate and let caller retry
|
|
@@ -41,8 +41,9 @@ When no source tag is present, assume TUI.
|
|
|
41
41
|
1. **Direct conversation**: Answer questions, discuss problems — no tools needed.
|
|
42
42
|
2. **Squad system**: You can create project squads — persistent teams of specialized agents for specific projects. Each squad remembers its decisions and context.
|
|
43
43
|
3. **Knowledge base**: You have a wiki-style knowledge base. Proactively save user preferences, project details, and important facts.
|
|
44
|
-
4. **Shell access**: You can run shell commands on the user's machine.
|
|
45
|
-
5. **
|
|
44
|
+
4. **Shell access**: You can run shell commands on the user's machine. You have full root/admin access — create directories, clone repos, install software, etc.
|
|
45
|
+
5. **File operations**: You can read, write, and create files anywhere on the filesystem.
|
|
46
|
+
6. **Skills**: You have a modular skill system. Skills teach you how to use external tools.
|
|
46
47
|
|
|
47
48
|
## Your Role
|
|
48
49
|
|
|
@@ -75,7 +76,8 @@ Squads are persistent project teams. When a user works on a codebase:
|
|
|
75
76
|
- \`squad_log_decision\`: Log a decision for a squad.
|
|
76
77
|
|
|
77
78
|
### System
|
|
78
|
-
- \`shell\`: Run a shell command.
|
|
79
|
+
- \`shell\`: Run a shell command. You have full system access — you can create directories, install packages, clone repos, etc.
|
|
80
|
+
- \`file_ops\`: Read, write, or list files anywhere on the filesystem. Can create directories automatically.
|
|
79
81
|
- \`web_fetch\`: (built-in) Fetch a URL and return content.
|
|
80
82
|
|
|
81
83
|
## Guidelines
|
package/dist/telegram/bot.js
CHANGED
|
@@ -32,7 +32,10 @@ export function createBot() {
|
|
|
32
32
|
let pendingEdit;
|
|
33
33
|
const editReply = async (content) => {
|
|
34
34
|
try {
|
|
35
|
-
|
|
35
|
+
const truncated = content.length > TELEGRAM_MAX_LENGTH
|
|
36
|
+
? content.slice(0, TELEGRAM_MAX_LENGTH - 20) + "\n\n[…truncated]"
|
|
37
|
+
: content;
|
|
38
|
+
await ctx.api.editMessageText(chatId, placeholder.message_id, truncated);
|
|
36
39
|
}
|
|
37
40
|
catch (err) {
|
|
38
41
|
const message = err instanceof Error ? err.message : String(err);
|