agentgui 1.0.864 → 1.0.865

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.
@@ -52,7 +52,8 @@ export function register(router, deps) {
52
52
  const hasChanges = statusResult.trim().length > 0;
53
53
  const unpushedResult = execSync('git rev-list --count --not --remotes' + devnull, { encoding: 'utf-8', cwd: STARTUP_CWD, shell: isWindows });
54
54
  const hasUnpushed = parseInt(unpushedResult.trim() || '0', 10) > 0;
55
- const ownsRemote = !remoteUrl.includes('github.com/') || remoteUrl.includes(process.env.GITHUB_USER || '');
55
+ const githubUser = process.env.GITHUB_USER;
56
+ const ownsRemote = !remoteUrl.includes('github.com/') || (!!githubUser && remoteUrl.includes(githubUser));
56
57
  return { ownsRemote, hasChanges, hasUnpushed, remoteUrl };
57
58
  } catch {
58
59
  return { ownsRemote: false, hasChanges: false, hasUnpushed: false, remoteUrl: '' };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.864",
3
+ "version": "1.0.865",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "electron/main.js",
@@ -29,10 +29,18 @@
29
29
  } else if (incoming.length > 0 && incoming.length < context.conversations.length) {
30
30
  const polledIds = new Set(incoming.map(c => c.id));
31
31
  const kept = context.conversations.filter(c => !polledIds.has(c.id));
32
- conversations = incoming.map(pc => {
32
+ const merged = incoming.map(pc => {
33
33
  const cached = context.conversations.find(c => c.id === pc.id);
34
34
  return cached ? Object.assign({}, cached, pc) : pc;
35
35
  }).concat(kept);
36
+ merged.sort((a, b) => {
37
+ const ap = a.pinned ? 1 : 0, bp = b.pinned ? 1 : 0;
38
+ if (ap !== bp) return bp - ap;
39
+ const as_ = a.sortOrder ?? 999999, bs_ = b.sortOrder ?? 999999;
40
+ if (as_ !== bs_) return as_ - bs_;
41
+ return (b.updated_at || 0) - (a.updated_at || 0);
42
+ });
43
+ conversations = merged;
36
44
  } else {
37
45
  conversations = incoming;
38
46
  }