thepopebot 1.2.75-beta.14 → 1.2.75-beta.15

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.
@@ -94,7 +94,12 @@ function Chat({ chatId, initialMessages = [], workspace = null, chatMode = null
94
94
  const isFinished = prevStatus.current !== "ready" && status === "ready";
95
95
  if (isMount || isFinished) {
96
96
  fetch(`/code/workspace-diff/${workspaceState.id}`).then((r) => r.json()).then((r) => {
97
- if (r.success) setDiffStats(r);
97
+ if (r.success) {
98
+ setDiffStats(r);
99
+ if (r.currentBranch) {
100
+ setWorkspaceState((prev) => prev && r.currentBranch !== prev.featureBranch ? { ...prev, featureBranch: r.currentBranch } : prev);
101
+ }
102
+ }
98
103
  }).catch(() => {
99
104
  });
100
105
  }
@@ -199,6 +204,9 @@ function Chat({ chatId, initialMessages = [], workspace = null, chatMode = null
199
204
  const data = await r.json();
200
205
  if (data.success) {
201
206
  setDiffStats(data);
207
+ if (data.currentBranch) {
208
+ setWorkspaceState((prev) => prev && data.currentBranch !== prev.featureBranch ? { ...prev, featureBranch: data.currentBranch } : prev);
209
+ }
202
210
  return data;
203
211
  }
204
212
  } catch {
@@ -118,7 +118,14 @@ export function Chat({ chatId, initialMessages = [], workspace = null, chatMode
118
118
  if (isMount || isFinished) {
119
119
  fetch(`/code/workspace-diff/${workspaceState.id}`)
120
120
  .then(r => r.json())
121
- .then(r => { if (r.success) setDiffStats(r); })
121
+ .then(r => {
122
+ if (r.success) {
123
+ setDiffStats(r);
124
+ if (r.currentBranch) {
125
+ setWorkspaceState(prev => prev && r.currentBranch !== prev.featureBranch ? { ...prev, featureBranch: r.currentBranch } : prev);
126
+ }
127
+ }
128
+ })
122
129
  .catch(() => {});
123
130
  }
124
131
  prevStatus.current = status;
@@ -244,7 +251,13 @@ export function Chat({ chatId, initialMessages = [], workspace = null, chatMode
244
251
  try {
245
252
  const r = await fetch(`/code/workspace-diff/${workspaceState.id}`);
246
253
  const data = await r.json();
247
- if (data.success) { setDiffStats(data); return data; }
254
+ if (data.success) {
255
+ setDiffStats(data);
256
+ if (data.currentBranch) {
257
+ setWorkspaceState(prev => prev && data.currentBranch !== prev.featureBranch ? { ...prev, featureBranch: data.currentBranch } : prev);
258
+ }
259
+ return data;
260
+ }
248
261
  } catch {}
249
262
  return null;
250
263
  }, [workspaceState?.id]);
@@ -293,6 +293,7 @@ function WorkspaceCommandButton({ workspaceId, diffStats, onDiffStatsRefresh, on
293
293
  onClick: onShowDiff,
294
294
  className: "text-xs leading-4 px-2.5 h-[28px] flex items-center gap-1.5 font-medium border border-border rounded-md whitespace-nowrap hover:bg-accent transition-colors cursor-pointer",
295
295
  children: [
296
+ diffStats?.currentBranch && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground truncate max-w-[120px]", title: diffStats.currentBranch, children: diffStats.currentBranch }),
296
297
  /* @__PURE__ */ jsxs("span", { className: "text-green-500", children: [
297
298
  "+",
298
299
  diffStats?.insertions ?? 0
@@ -341,6 +341,9 @@ function WorkspaceCommandButton({ workspaceId, diffStats, onDiffStatsRefresh, on
341
341
  onClick={onShowDiff}
342
342
  className="text-xs leading-4 px-2.5 h-[28px] flex items-center gap-1.5 font-medium border border-border rounded-md whitespace-nowrap hover:bg-accent transition-colors cursor-pointer"
343
343
  >
344
+ {diffStats?.currentBranch && (
345
+ <span className="text-muted-foreground truncate max-w-[120px]" title={diffStats.currentBranch}>{diffStats.currentBranch}</span>
346
+ )}
344
347
  <span className="text-green-500">+{diffStats?.insertions ?? 0}</span>
345
348
  <span className="text-destructive">-{diffStats?.deletions ?? 0}</span>
346
349
  </button>
@@ -592,7 +592,14 @@ export async function getWorkspaceDiffStats(id, authenticatedUser) {
592
592
  }
593
593
 
594
594
  updateHasChanges(id, insertions > 0 || deletions > 0);
595
- return { success: true, insertions, deletions };
595
+
596
+ // Sync featureBranch in DB if the actual branch differs
597
+ if (currentBranch && currentBranch !== workspace.featureBranch) {
598
+ const { updateFeatureBranch } = await import('../db/code-workspaces.js');
599
+ updateFeatureBranch(id, currentBranch);
600
+ }
601
+
602
+ return { success: true, insertions, deletions, currentBranch };
596
603
  } catch (err) {
597
604
  console.error(`[getWorkspaceDiffStats] workspace=${id}`, err);
598
605
  return { success: false };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thepopebot",
3
- "version": "1.2.75-beta.14",
3
+ "version": "1.2.75-beta.15",
4
4
  "type": "module",
5
5
  "description": "Create autonomous AI agents with a two-layer architecture: Next.js Event Handler + Docker Agent.",
6
6
  "bin": {
@@ -1,117 +0,0 @@
1
- # pi-skills
2
-
3
- A collection of skills for [pi-coding-agent](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent), compatible with Claude Code, Codex CLI, Amp, and Droid.
4
-
5
- ## Installation
6
-
7
- ### pi-coding-agent
8
-
9
- ```bash
10
- # User-level (available in all projects)
11
- git clone https://github.com/badlogic/pi-skills ~/.pi/agent/skills/pi-skills
12
-
13
- # Or project-level
14
- git clone https://github.com/badlogic/pi-skills .pi/skills/pi-skills
15
- ```
16
-
17
- ### Codex CLI
18
-
19
- ```bash
20
- git clone https://github.com/badlogic/pi-skills ~/.codex/skills/pi-skills
21
- ```
22
-
23
- ### Amp
24
-
25
- Amp finds skills recursively in toolboxes:
26
-
27
- ```bash
28
- git clone https://github.com/badlogic/pi-skills ~/.config/amp/tools/pi-skills
29
- ```
30
-
31
- ### Droid (Factory)
32
-
33
- ```bash
34
- # User-level
35
- git clone https://github.com/badlogic/pi-skills ~/.factory/skills/pi-skills
36
-
37
- # Or project-level
38
- git clone https://github.com/badlogic/pi-skills .factory/skills/pi-skills
39
- ```
40
-
41
- ### Claude Code
42
-
43
- Claude Code only looks one level deep for `SKILL.md` files, so each skill folder must be directly under the skills directory. Clone the repo somewhere, then symlink individual skills:
44
-
45
- ```bash
46
- # Clone to a convenient location
47
- git clone https://github.com/badlogic/pi-skills ~/pi-skills
48
-
49
- # Symlink individual skills (user-level)
50
- mkdir -p ~/.claude/skills
51
- ln -s ~/pi-skills/brave-search ~/.claude/skills/brave-search
52
- ln -s ~/pi-skills/browser-tools ~/.claude/skills/browser-tools
53
- ln -s ~/pi-skills/gccli ~/.claude/skills/gccli
54
- ln -s ~/pi-skills/gdcli ~/.claude/skills/gdcli
55
- ln -s ~/pi-skills/gmcli ~/.claude/skills/gmcli
56
- ln -s ~/pi-skills/transcribe ~/.claude/skills/transcribe
57
- ln -s ~/pi-skills/vscode ~/.claude/skills/vscode
58
- ln -s ~/pi-skills/youtube-transcript ~/.claude/skills/youtube-transcript
59
-
60
- # Or project-level
61
- mkdir -p .claude/skills
62
- ln -s ~/pi-skills/brave-search .claude/skills/brave-search
63
- ln -s ~/pi-skills/browser-tools .claude/skills/browser-tools
64
- ln -s ~/pi-skills/gccli .claude/skills/gccli
65
- ln -s ~/pi-skills/gdcli .claude/skills/gdcli
66
- ln -s ~/pi-skills/gmcli .claude/skills/gmcli
67
- ln -s ~/pi-skills/transcribe .claude/skills/transcribe
68
- ln -s ~/pi-skills/vscode .claude/skills/vscode
69
- ln -s ~/pi-skills/youtube-transcript .claude/skills/youtube-transcript
70
- ```
71
-
72
- ## Available Skills
73
-
74
- | Skill | Description |
75
- |-------|-------------|
76
- | [brave-search](brave-search/SKILL.md) | Web search and content extraction via Brave Search |
77
- | [gccli](gccli/SKILL.md) | Google Calendar CLI for events and availability |
78
- | [gdcli](gdcli/SKILL.md) | Google Drive CLI for file management and sharing |
79
- | [gmcli](gmcli/SKILL.md) | Gmail CLI for email, drafts, and labels |
80
- | [transcribe](transcribe/SKILL.md) | Speech-to-text transcription via Groq Whisper API |
81
- | [vscode](vscode/SKILL.md) | VS Code integration for diffs and file comparison |
82
- | [youtube-transcript](youtube-transcript/SKILL.md) | Fetch YouTube video transcripts |
83
-
84
- ## Skill Format
85
-
86
- Each skill follows the pi/Claude Code format:
87
-
88
- ```markdown
89
- ---
90
- name: skill-name
91
- description: Short description shown to agent
92
- ---
93
-
94
- # Instructions
95
-
96
- Detailed instructions here...
97
- Helper files available at: skills/skill-name/
98
- ```
99
-
100
- Skills use project-root-relative paths (e.g., `skills/brave-search/search.js`).
101
-
102
- ## Requirements
103
-
104
- Some skills require additional setup. Generally, the agent will walk you through that. But if not, here you go:
105
-
106
- - **brave-search**: Requires Node.js. Run `npm install` in the skill directory.
107
- - **gccli**: Requires Node.js. Install globally with `npm install -g @mariozechner/gccli`.
108
- - **gdcli**: Requires Node.js. Install globally with `npm install -g @mariozechner/gdcli`.
109
- - **gmcli**: Requires Node.js. Install globally with `npm install -g @mariozechner/gmcli`.
110
- - **subagent**: Requires pi-coding-agent. Install globally with `npm install -g @mariozechner/pi-coding-agent`.
111
- - **transcribe**: Requires curl and a Groq API key.
112
- - **vscode**: Requires VS Code with `code` CLI in PATH.
113
- - **youtube-transcript**: Requires Node.js. Run `npm install` in the skill directory.
114
-
115
- ## License
116
-
117
- MIT