@hienlh/ppm 0.9.33 → 0.9.35
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 +23 -0
- package/dist/web/assets/{browser-tab-B9nNKjZX.js → browser-tab-DnIsHiCc.js} +1 -1
- package/dist/web/assets/{chat-tab-6XGhEKaC.js → chat-tab-il6D4jql.js} +2 -2
- package/dist/web/assets/{code-editor-DMZMpzt2.js → code-editor-BUc1jBqm.js} +1 -1
- package/dist/web/assets/{database-viewer-CnP1FFS2.js → database-viewer-TjRo2b8_.js} +1 -1
- package/dist/web/assets/{diff-viewer-Cvwd0XBO.js → diff-viewer-BMhCz0xk.js} +1 -1
- package/dist/web/assets/{extension-webview-DkhsRepr.js → extension-webview-DiVdlE2r.js} +1 -1
- package/dist/web/assets/{git-graph-C3670Nxm.js → git-graph-4eGJ8B1A.js} +1 -1
- package/dist/web/assets/{index-DjIQL8ar.js → index-BmcV1di6.js} +4 -4
- package/dist/web/assets/keybindings-store--5T5hsAj.js +1 -0
- package/dist/web/assets/{markdown-renderer-Co04dDdI.js → markdown-renderer-IyEzLrC6.js} +1 -1
- package/dist/web/assets/{postgres-viewer-D8K1qnnA.js → postgres-viewer-CSynGGkJ.js} +1 -1
- package/dist/web/assets/{settings-tab-64ODAeQZ.js → settings-tab-BdI4HhRa.js} +1 -1
- package/dist/web/assets/{sqlite-viewer-ClX7FICB.js → sqlite-viewer-C5mviyU5.js} +1 -1
- package/dist/web/assets/{terminal-tab-Dw4IKWGM.js → terminal-tab-CDyC1grg.js} +1 -1
- package/dist/web/assets/{use-monaco-theme-DA7EyR70.js → use-monaco-theme-DcVicB_i.js} +1 -1
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/src/server/index.ts +4 -4
- package/src/server/routes/settings.ts +14 -14
- package/src/services/db.service.ts +29 -29
- package/src/services/{clawbot/clawbot-memory.ts → ppmbot/ppmbot-memory.ts} +29 -29
- package/src/services/{clawbot/clawbot-service.ts → ppmbot/ppmbot-service.ts} +55 -38
- package/src/services/{clawbot/clawbot-session.ts → ppmbot/ppmbot-session.ts} +48 -37
- package/src/services/{clawbot/clawbot-streamer.ts → ppmbot/ppmbot-streamer.ts} +114 -80
- package/src/services/{clawbot/clawbot-telegram.ts → ppmbot/ppmbot-telegram.ts} +46 -18
- package/src/types/config.ts +3 -3
- package/src/types/{clawbot.ts → ppmbot.ts} +10 -10
- package/src/web/components/chat/chat-history-bar.tsx +2 -2
- package/src/web/components/settings/{clawbot-settings-section.tsx → ppmbot-settings-section.tsx} +7 -7
- package/src/web/components/settings/settings-tab.tsx +3 -3
- package/dist/web/assets/keybindings-store-DHh6rwm-.js +0 -1
- /package/src/services/{clawbot/clawbot-formatter.ts → ppmbot/ppmbot-formatter.ts} +0 -0
|
@@ -21,8 +21,8 @@ export interface TelegramSentMessage {
|
|
|
21
21
|
date: number;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
export interface
|
|
24
|
+
/** PPMBot session row from SQLite */
|
|
25
|
+
export interface PPMBotSessionRow {
|
|
26
26
|
id: number;
|
|
27
27
|
telegram_chat_id: string;
|
|
28
28
|
session_id: string;
|
|
@@ -34,12 +34,12 @@ export interface ClawBotSessionRow {
|
|
|
34
34
|
last_message_at: number;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
/**
|
|
38
|
-
export interface
|
|
37
|
+
/** PPMBot memory row from SQLite */
|
|
38
|
+
export interface PPMBotMemoryRow {
|
|
39
39
|
id: number;
|
|
40
40
|
project: string;
|
|
41
41
|
content: string;
|
|
42
|
-
category:
|
|
42
|
+
category: PPMBotMemoryCategory;
|
|
43
43
|
importance: number;
|
|
44
44
|
created_at: number;
|
|
45
45
|
updated_at: number;
|
|
@@ -47,7 +47,7 @@ export interface ClawBotMemoryRow {
|
|
|
47
47
|
superseded_by: number | null;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
export type
|
|
50
|
+
export type PPMBotMemoryCategory =
|
|
51
51
|
| "fact"
|
|
52
52
|
| "decision"
|
|
53
53
|
| "preference"
|
|
@@ -55,7 +55,7 @@ export type ClawBotMemoryCategory =
|
|
|
55
55
|
| "issue";
|
|
56
56
|
|
|
57
57
|
/** Active session state tracked in memory (not DB) */
|
|
58
|
-
export interface
|
|
58
|
+
export interface PPMBotActiveSession {
|
|
59
59
|
telegramChatId: string;
|
|
60
60
|
sessionId: string;
|
|
61
61
|
providerId: string;
|
|
@@ -70,7 +70,7 @@ export interface ClawBotActiveSession {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
/** Parsed command from Telegram message */
|
|
73
|
-
export interface
|
|
73
|
+
export interface PPMBotCommand {
|
|
74
74
|
command: string;
|
|
75
75
|
args: string;
|
|
76
76
|
chatId: number;
|
|
@@ -83,7 +83,7 @@ export interface ClawBotCommand {
|
|
|
83
83
|
export interface MemoryRecallResult {
|
|
84
84
|
id: number;
|
|
85
85
|
content: string;
|
|
86
|
-
category:
|
|
86
|
+
category: PPMBotMemoryCategory;
|
|
87
87
|
importance: number;
|
|
88
88
|
project: string;
|
|
89
89
|
/** FTS5 rank score (lower = more relevant) */
|
|
@@ -91,7 +91,7 @@ export interface MemoryRecallResult {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/** Paired chat row from SQLite */
|
|
94
|
-
export interface
|
|
94
|
+
export interface PPMBotPairedChat {
|
|
95
95
|
id: number;
|
|
96
96
|
telegram_chat_id: string;
|
|
97
97
|
telegram_user_id: string | null;
|
|
@@ -400,10 +400,10 @@ export function ChatHistoryBar({
|
|
|
400
400
|
onClick={() => openSession(session)}
|
|
401
401
|
className="text-[11px] truncate flex-1 text-left flex items-center gap-1"
|
|
402
402
|
>
|
|
403
|
-
{session.title?.startsWith("[
|
|
403
|
+
{session.title?.startsWith("[PPM]") && (
|
|
404
404
|
<Bot className="size-3 text-muted-foreground shrink-0" />
|
|
405
405
|
)}
|
|
406
|
-
{session.title?.startsWith("[
|
|
406
|
+
{session.title?.startsWith("[PPM]")
|
|
407
407
|
? session.title.slice(7)
|
|
408
408
|
: session.title || "Untitled"}
|
|
409
409
|
</button>
|
package/src/web/components/settings/{clawbot-settings-section.tsx → ppmbot-settings-section.tsx}
RENAMED
|
@@ -5,7 +5,7 @@ import { Switch } from "@/components/ui/switch";
|
|
|
5
5
|
import { api } from "@/lib/api-client";
|
|
6
6
|
import { Trash2, CheckCircle, Clock } from "lucide-react";
|
|
7
7
|
|
|
8
|
-
interface
|
|
8
|
+
interface PPMBotConfig {
|
|
9
9
|
enabled: boolean;
|
|
10
10
|
default_provider: string;
|
|
11
11
|
default_project: string;
|
|
@@ -27,8 +27,8 @@ interface PairedChat {
|
|
|
27
27
|
approved_at: number | null;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
export function
|
|
31
|
-
const [config, setConfig] = useState<
|
|
30
|
+
export function PPMBotSettingsSection() {
|
|
31
|
+
const [config, setConfig] = useState<PPMBotConfig | null>(null);
|
|
32
32
|
const [saving, setSaving] = useState(false);
|
|
33
33
|
const [status, setStatus] = useState<{ type: "ok" | "err"; msg: string } | null>(null);
|
|
34
34
|
|
|
@@ -51,7 +51,7 @@ export function ClawBotSettingsSection() {
|
|
|
51
51
|
}, []);
|
|
52
52
|
|
|
53
53
|
useEffect(() => {
|
|
54
|
-
api.get<
|
|
54
|
+
api.get<PPMBotConfig>("/api/settings/clawbot").then((data) => {
|
|
55
55
|
setConfig(data);
|
|
56
56
|
setEnabled(data.enabled);
|
|
57
57
|
setDefaultProject(data.default_project);
|
|
@@ -67,7 +67,7 @@ export function ClawBotSettingsSection() {
|
|
|
67
67
|
setSaving(true);
|
|
68
68
|
setStatus(null);
|
|
69
69
|
try {
|
|
70
|
-
const body: Partial<
|
|
70
|
+
const body: Partial<PPMBotConfig> = {
|
|
71
71
|
enabled,
|
|
72
72
|
default_project: defaultProject.trim(),
|
|
73
73
|
system_prompt: systemPrompt,
|
|
@@ -75,7 +75,7 @@ export function ClawBotSettingsSection() {
|
|
|
75
75
|
show_thinking: showThinking,
|
|
76
76
|
debounce_ms: debounceMs,
|
|
77
77
|
};
|
|
78
|
-
const data = await api.put<
|
|
78
|
+
const data = await api.put<PPMBotConfig>("/api/settings/clawbot", body);
|
|
79
79
|
setConfig(data);
|
|
80
80
|
setStatus({ type: "ok", msg: enabled ? "Saved — bot started" : "Saved — bot stopped" });
|
|
81
81
|
} catch (e) {
|
|
@@ -117,7 +117,7 @@ export function ClawBotSettingsSection() {
|
|
|
117
117
|
{/* Enable/Disable */}
|
|
118
118
|
<div className="flex items-center justify-between">
|
|
119
119
|
<div>
|
|
120
|
-
<p className="text-xs font-medium">Enable
|
|
120
|
+
<p className="text-xs font-medium">Enable PPMBot</p>
|
|
121
121
|
<p className="text-[10px] text-muted-foreground">
|
|
122
122
|
Telegram bot that chats with your AI providers
|
|
123
123
|
</p>
|
|
@@ -15,7 +15,7 @@ import { TelegramSettingsSection } from "./telegram-settings-section";
|
|
|
15
15
|
import { ProxySettingsSection } from "./proxy-settings-section";
|
|
16
16
|
import { McpSettingsSection } from "./mcp-settings-section";
|
|
17
17
|
import { ExtensionManagerSection } from "./extension-manager-section";
|
|
18
|
-
import {
|
|
18
|
+
import { PPMBotSettingsSection } from "./ppmbot-settings-section";
|
|
19
19
|
import { ChangePasswordSection } from "./change-password-section";
|
|
20
20
|
import { usePushNotification } from "@/hooks/use-push-notification";
|
|
21
21
|
|
|
@@ -34,7 +34,7 @@ type SettingsCategory = "ai" | "notifications" | "clawbot" | "proxy" | "shortcut
|
|
|
34
34
|
const CATEGORIES: { value: SettingsCategory; label: string; subtitle: string; icon: React.ElementType }[] = [
|
|
35
35
|
{ value: "ai", label: "AI Provider", subtitle: "Model, execution mode, limits", icon: Bot },
|
|
36
36
|
{ value: "notifications", label: "Notifications", subtitle: "Push & Telegram alerts", icon: BellRing },
|
|
37
|
-
{ value: "clawbot", label: "
|
|
37
|
+
{ value: "clawbot", label: "PPMBot", subtitle: "Telegram AI bot", icon: Bot },
|
|
38
38
|
{ value: "proxy", label: "API Proxy", subtitle: "Expose accounts as Anthropic API", icon: Globe },
|
|
39
39
|
{ value: "shortcuts", label: "Keyboard Shortcuts", subtitle: "Customize key bindings", icon: Keyboard },
|
|
40
40
|
{ value: "mcp", label: "MCP Servers", subtitle: "Model Context Protocol tools", icon: Plug },
|
|
@@ -89,7 +89,7 @@ export function SettingsTab() {
|
|
|
89
89
|
<div className="p-3">
|
|
90
90
|
{activeCategory === "ai" && <AISettingsSection compact />}
|
|
91
91
|
{activeCategory === "notifications" && <NotificationsContent isSubscribed={isSubscribed} loading={loading} permission={permission} pushError={pushError} subscribe={subscribe} unsubscribe={unsubscribe} />}
|
|
92
|
-
{activeCategory === "clawbot" && <
|
|
92
|
+
{activeCategory === "clawbot" && <PPMBotSettingsSection />}
|
|
93
93
|
{activeCategory === "proxy" && <ProxySettingsSection />}
|
|
94
94
|
{activeCategory === "shortcuts" && <KeyboardShortcutsSection />}
|
|
95
95
|
{activeCategory === "mcp" && <McpSettingsSection />}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./react-nm2Ru1Pt.js";import"./api-client-BKIT_Qeg.js";import{W as e}from"./index-DjIQL8ar.js";export{e as useKeybindingsStore};
|
|
File without changes
|