@gitterm/bot 0.2.0 → 0.2.1
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.
- package/dist/index.js +12 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -94,8 +94,17 @@ function agentInstructions(platform, extra) {
|
|
|
94
94
|
`- Use the question tool only when a decision genuinely blocks you; the person answers with buttons in ${platform}. Do not ask for confirmation of routine steps.`,
|
|
95
95
|
`- You cannot send files to ${platform}; describe results or link to them instead.`
|
|
96
96
|
];
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
const owner = extra?.trim();
|
|
98
|
+
if (!owner)
|
|
99
|
+
return lines.join(`
|
|
100
|
+
`);
|
|
101
|
+
return [
|
|
102
|
+
lines.join(`
|
|
103
|
+
`),
|
|
104
|
+
"## Instructions from this bot's owner",
|
|
105
|
+
"These take precedence over the defaults above.",
|
|
106
|
+
owner
|
|
107
|
+
].join(`
|
|
99
108
|
|
|
100
109
|
`);
|
|
101
110
|
}
|
|
@@ -1352,7 +1361,7 @@ function createBot(initial) {
|
|
|
1352
1361
|
if (!(error instanceof GittermError2 && error.code === "CONFLICT") || waited >= 1e5)
|
|
1353
1362
|
throw error;
|
|
1354
1363
|
if (waited === 0)
|
|
1355
|
-
log.warn("Another process is running this bot
|
|
1364
|
+
log.warn("Another process is running this bot, or one stopped without calling bot.stop() and holds it for up to 90 s; waiting…");
|
|
1356
1365
|
await new Promise((resolve) => setTimeout(resolve, 5000));
|
|
1357
1366
|
}
|
|
1358
1367
|
}
|