@gguf/pigbot 0.0.5 → 0.0.6
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/CHANGELOG.md +4 -0
- package/README.md +1 -1
- package/assets/images/icon.png +0 -0
- package/dist/build-info.json +2 -2
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/extension.js +70 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ pnpm gateway:watch
|
|
|
60
60
|
## How it works (short)
|
|
61
61
|
|
|
62
62
|
```
|
|
63
|
-
WhatsApp
|
|
63
|
+
WhatsApp/Telegram/Slack/Discord/Signal/iMessage/GoogleChat/MicrosoftTeams...
|
|
64
64
|
│
|
|
65
65
|
▼
|
|
66
66
|
┌───────────────────────────────┐
|
|
Binary file
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3a0db30090651d752d3f8bd48482df8dfb20076f1ca0b41579b454a0452b9406
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as vscode from 'vscode';
|
|
2
|
+
import * as os from 'os';
|
|
3
|
+
let statusBarItem;
|
|
4
|
+
let terminal;
|
|
5
|
+
export function activate(context) {
|
|
6
|
+
console.log('Moltbot extension is now active');
|
|
7
|
+
// Create status bar item
|
|
8
|
+
statusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, 100);
|
|
9
|
+
statusBarItem.command = 'moltbot.connect';
|
|
10
|
+
// statusBarItem.text = '$(plug) Moltbot - Not connected (click to connect)';
|
|
11
|
+
statusBarItem.text = '$(plug) Moltbot';
|
|
12
|
+
statusBarItem.tooltip = 'Click to connect to Moltbot';
|
|
13
|
+
statusBarItem.show();
|
|
14
|
+
context.subscriptions.push(statusBarItem);
|
|
15
|
+
// Register connect command
|
|
16
|
+
let connectCommand = vscode.commands.registerCommand('moltbot.connect', async () => {
|
|
17
|
+
await connect();
|
|
18
|
+
});
|
|
19
|
+
context.subscriptions.push(connectCommand);
|
|
20
|
+
// Check auto-connect setting
|
|
21
|
+
const config = vscode.workspace.getConfiguration('moltbot');
|
|
22
|
+
const autoConnect = config.get('autoConnect', false);
|
|
23
|
+
if (autoConnect) {
|
|
24
|
+
// Auto-connect on startup
|
|
25
|
+
setTimeout(() => {
|
|
26
|
+
connect();
|
|
27
|
+
}, 1000); // Small delay to ensure everything is initialized
|
|
28
|
+
}
|
|
29
|
+
// Listen for terminal close events
|
|
30
|
+
vscode.window.onDidCloseTerminal((closedTerminal) => {
|
|
31
|
+
if (terminal && closedTerminal === terminal) {
|
|
32
|
+
terminal = undefined;
|
|
33
|
+
statusBarItem.text = '$(plug) Moltbot';
|
|
34
|
+
statusBarItem.tooltip = 'Click to connect to Moltbot';
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
async function connect() {
|
|
39
|
+
try {
|
|
40
|
+
// Update status to connecting
|
|
41
|
+
statusBarItem.text = '$(sync~spin) Connecting...';
|
|
42
|
+
statusBarItem.tooltip = 'Connection in progress';
|
|
43
|
+
// Detect OS
|
|
44
|
+
const platform = os.platform();
|
|
45
|
+
const isWindows = platform === 'win32';
|
|
46
|
+
// Determine command based on OS
|
|
47
|
+
const command = isWindows ? 'moltbot status' : 'moltbot status';
|
|
48
|
+
// Create or reuse terminal
|
|
49
|
+
if (!terminal) {
|
|
50
|
+
terminal = vscode.window.createTerminal('Moltbot');
|
|
51
|
+
}
|
|
52
|
+
// Show terminal and send command
|
|
53
|
+
terminal.show(true); // true = preserve focus
|
|
54
|
+
terminal.sendText(command);
|
|
55
|
+
// Update status to connected
|
|
56
|
+
statusBarItem.text = '$(check) Moltbot';
|
|
57
|
+
statusBarItem.tooltip = 'Connected to Moltbot';
|
|
58
|
+
vscode.window.showInformationMessage('Connected to Moltbot');
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
statusBarItem.text = '$(plug) Moltbot';
|
|
62
|
+
statusBarItem.tooltip = 'Click to connect to Moltbot';
|
|
63
|
+
vscode.window.showErrorMessage(`Failed to connect: ${error}`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export function deactivate() {
|
|
67
|
+
if (terminal) {
|
|
68
|
+
terminal.dispose();
|
|
69
|
+
}
|
|
70
|
+
}
|