@chrysb/alphaclaw 0.1.25 → 0.2.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/bin/alphaclaw.js +391 -54
- package/lib/public/js/app.js +38 -19
- package/lib/public/js/components/channels.js +14 -3
- package/lib/public/js/components/telegram-workspace.js +1377 -0
- package/lib/server/constants.js +1 -0
- package/lib/server/helpers.js +32 -0
- package/lib/server/onboarding/github.js +1 -2
- package/lib/server/onboarding/index.js +9 -7
- package/lib/server/onboarding/openclaw.js +4 -11
- package/lib/server/onboarding/workspace.js +26 -3
- package/lib/server/routes/auth.js +24 -6
- package/lib/server/routes/proxy.js +4 -4
- package/lib/server/routes/telegram.js +407 -0
- package/lib/server/telegram-api.js +65 -0
- package/lib/server/telegram-workspace.js +82 -0
- package/lib/server/topic-registry.js +152 -0
- package/lib/server.js +7 -1
- package/lib/setup/core-prompts/TOOLS.md +1 -1
- package/lib/setup/env.template +3 -0
- package/lib/setup/hourly-git-sync.sh +9 -10
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ const kChannelMeta = {
|
|
|
9
9
|
discord: { label: 'Discord', iconSrc: '/assets/icons/discord.svg' },
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
export function Channels({ channels, onSwitchTab }) {
|
|
12
|
+
export function Channels({ channels, onSwitchTab, onNavigate }) {
|
|
13
13
|
return html`
|
|
14
14
|
<div class="bg-surface border border-border rounded-xl p-4">
|
|
15
15
|
<h2 class="card-label mb-3">Channels</h2>
|
|
@@ -17,6 +17,7 @@ export function Channels({ channels, onSwitchTab }) {
|
|
|
17
17
|
${channels ? ALL_CHANNELS.map(ch => {
|
|
18
18
|
const info = channels[ch];
|
|
19
19
|
const channelMeta = kChannelMeta[ch] || { label: ch.charAt(0).toUpperCase() + ch.slice(1), iconSrc: '' };
|
|
20
|
+
const isClickable = ch === 'telegram' && info && onNavigate;
|
|
20
21
|
let badge;
|
|
21
22
|
if (!info) {
|
|
22
23
|
badge = html`<a
|
|
@@ -29,14 +30,24 @@ export function Channels({ channels, onSwitchTab }) {
|
|
|
29
30
|
} else {
|
|
30
31
|
badge = html`<${Badge} tone="warning">Awaiting pairing</${Badge}>`;
|
|
31
32
|
}
|
|
32
|
-
return html`<div
|
|
33
|
+
return html`<div
|
|
34
|
+
class="flex justify-between items-center py-1.5 ${isClickable ? 'cursor-pointer hover:bg-white/5 -mx-2 px-2 rounded-lg transition-colors' : ''}"
|
|
35
|
+
onclick=${isClickable ? () => onNavigate('telegram') : undefined}
|
|
36
|
+
>
|
|
33
37
|
<span class="font-medium text-sm flex items-center gap-2">
|
|
34
38
|
${channelMeta.iconSrc
|
|
35
39
|
? html`<img src=${channelMeta.iconSrc} alt="" class="w-4 h-4 rounded-sm" aria-hidden="true" />`
|
|
36
40
|
: null}
|
|
37
41
|
${channelMeta.label}
|
|
38
42
|
</span>
|
|
39
|
-
|
|
43
|
+
<span class="flex items-center gap-2">
|
|
44
|
+
${badge}
|
|
45
|
+
${isClickable && html`
|
|
46
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor" class="text-gray-600">
|
|
47
|
+
<path d="M5.646 3.354a.5.5 0 01.708 0l4.5 4.5a.5.5 0 010 .708l-4.5 4.5a.5.5 0 01-.708-.708L9.793 8 5.646 3.854a.5.5 0 010-.5z"/>
|
|
48
|
+
</svg>
|
|
49
|
+
`}
|
|
50
|
+
</span>
|
|
40
51
|
</div>`;
|
|
41
52
|
}) : html`<div class="text-gray-500 text-sm text-center py-2">Loading...</div>`}
|
|
42
53
|
</div>
|