@meet-ai/cli 0.0.2 → 0.0.4
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 +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -128,7 +128,7 @@ function createClient(baseUrl, apiKey) {
|
|
|
128
128
|
const connectTimeout = setTimeout(() => {
|
|
129
129
|
if (ws.readyState !== WebSocket.OPEN) {
|
|
130
130
|
wsLog({ event: "timeout", after_ms: 1e4 });
|
|
131
|
-
ws.close();
|
|
131
|
+
ws.close(4000, "connect timeout");
|
|
132
132
|
}
|
|
133
133
|
}, 1e4);
|
|
134
134
|
ws.onopen = async () => {
|
|
@@ -279,7 +279,8 @@ switch (command) {
|
|
|
279
279
|
case "send-message": {
|
|
280
280
|
const { positional: smPos, flags: smFlags } = parseFlags(args);
|
|
281
281
|
const [roomId, sender, ...rest] = smPos;
|
|
282
|
-
const content = rest.join(" ")
|
|
282
|
+
const content = rest.join(" ").replace(/\\n/g, `
|
|
283
|
+
`);
|
|
283
284
|
if (!roomId || !sender || !content) {
|
|
284
285
|
console.error("Usage: cli send-message <roomId> <sender> <content> [--color <color>]");
|
|
285
286
|
process.exit(1);
|
|
@@ -384,7 +385,7 @@ switch (command) {
|
|
|
384
385
|
|
|
385
386
|
Environment variables:
|
|
386
387
|
MEET_AI_URL Server URL (default: https://meet-ai.cc)
|
|
387
|
-
MEET_AI_KEY API key for authentication
|
|
388
|
+
MEET_AI_KEY API key for authentication
|
|
388
389
|
|
|
389
390
|
Commands:
|
|
390
391
|
create-room <name> Create a new chat room
|