@colinlu50/openclaw-lark-stream 260323.2.0 → 260323.3.0
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/README.md +1 -1
- package/bin/openclaw-lark.js +23 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ npx -y @colinlu50/openclaw-lark-stream install
|
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
45
|
cd ~/.openclaw/extensions
|
|
46
|
-
git clone
|
|
46
|
+
git clone https://github.com/ColinLu50/openclaw-lark-stream.git openclaw-lark-stream
|
|
47
47
|
cd openclaw-lark-stream && npm install && npm run build
|
|
48
48
|
openclaw gateway restart
|
|
49
49
|
```
|
package/bin/openclaw-lark.js
CHANGED
|
@@ -97,7 +97,8 @@ async function configureBotIfNeeded() {
|
|
|
97
97
|
console.log(`\nFound existing bot config (App ID: ${existing.appId}).`);
|
|
98
98
|
const reuse = await ask("Use existing bot config? (Y/n): ");
|
|
99
99
|
if (reuse.toLowerCase() !== "n") {
|
|
100
|
-
|
|
100
|
+
// Keep bot credentials but ensure streaming is enabled
|
|
101
|
+
ensureStreamingConfig(cfg);
|
|
101
102
|
return;
|
|
102
103
|
}
|
|
103
104
|
}
|
|
@@ -149,6 +150,27 @@ async function configureBotIfNeeded() {
|
|
|
149
150
|
// Helpers
|
|
150
151
|
// ---------------------------------------------------------------------------
|
|
151
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Ensure streaming is enabled on an existing config.
|
|
155
|
+
*/
|
|
156
|
+
function ensureStreamingConfig(cfg) {
|
|
157
|
+
if (!cfg.channels?.feishu) return;
|
|
158
|
+
let changed = false;
|
|
159
|
+
if (!cfg.channels.feishu.streaming) {
|
|
160
|
+
cfg.channels.feishu.streaming = true;
|
|
161
|
+
changed = true;
|
|
162
|
+
}
|
|
163
|
+
const rm = cfg.channels.feishu.replyMode || {};
|
|
164
|
+
if (rm.direct !== "streaming" || rm.group !== "streaming" || rm.default !== "streaming") {
|
|
165
|
+
cfg.channels.feishu.replyMode = { direct: "streaming", group: "streaming", default: "streaming" };
|
|
166
|
+
changed = true;
|
|
167
|
+
}
|
|
168
|
+
if (changed) {
|
|
169
|
+
writeFileSync(CONFIG_FILE, JSON.stringify(cfg, null, 2) + "\n", "utf8");
|
|
170
|
+
console.log("Enabled streaming mode for all reply modes.");
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
152
174
|
function ask(prompt) {
|
|
153
175
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
154
176
|
return new Promise((resolve) => {
|