@agent-link/server 0.1.55 → 0.1.56

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-link/server",
3
- "version": "0.1.55",
3
+ "version": "0.1.56",
4
4
  "description": "AgentLink relay server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/web/app.js CHANGED
@@ -288,6 +288,7 @@ const App = {
288
288
  selectWorkDirHistory: sidebar.selectWorkDirHistory,
289
289
  removeWorkDirHistory: sidebar.removeWorkDirHistory,
290
290
  toggleWorkDirHistory: sidebar.toggleWorkDirHistory,
291
+ selectRecentDir: sidebar.selectRecentDir,
291
292
  // File attachments
292
293
  attachments, fileInputRef, dragOver,
293
294
  triggerFileInput: fileAttach.triggerFileInput,
@@ -345,33 +346,11 @@ const App = {
345
346
  </div>
346
347
  <div class="sidebar-workdir-header">
347
348
  <div class="sidebar-workdir-label">Working Directory</div>
348
- <div class="sidebar-workdir-actions">
349
- <button class="sidebar-change-dir-btn" @click="toggleWorkDirHistory" title="Recent directories" :disabled="isProcessing" v-if="workDirHistory.length > 1">
350
- <svg viewBox="0 0 24 24" width="12" height="12"><path fill="currentColor" d="M13 3a9 9 0 0 0-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42A8.954 8.954 0 0 0 13 21a9 9 0 0 0 0-18zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/></svg>
351
- </button>
352
- <button class="sidebar-change-dir-btn" @click="openFolderPicker" title="Change working directory" :disabled="isProcessing">
353
- <svg viewBox="0 0 24 24" width="12" height="12"><path fill="currentColor" d="M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/></svg>
354
- </button>
355
- </div>
349
+ <button class="sidebar-change-dir-btn" @click="openFolderPicker" title="Change working directory" :disabled="isProcessing">
350
+ <svg viewBox="0 0 24 24" width="12" height="12"><path fill="currentColor" d="M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/></svg>
351
+ </button>
356
352
  </div>
357
353
  <div class="sidebar-workdir-path" :title="workDir">{{ workDir }}</div>
358
- <!-- Workdir history dropdown -->
359
- <div v-if="workDirHistoryOpen && workDirHistory.length > 1" class="workdir-history-dropdown">
360
- <div
361
- v-for="dir in workDirHistory" :key="dir"
362
- :class="['workdir-history-item', { active: dir === workDir }]"
363
- @click="selectWorkDirHistory(dir)"
364
- :title="dir"
365
- >
366
- <span class="workdir-history-path">{{ dir }}</span>
367
- <button
368
- v-if="dir !== workDir"
369
- class="workdir-history-remove"
370
- @click.stop="removeWorkDirHistory(dir)"
371
- title="Remove from history"
372
- >&times;</button>
373
- </div>
374
- </div>
375
354
  </div>
376
355
  </div>
377
356
 
@@ -642,6 +621,23 @@ const App = {
642
621
  </button>
643
622
  <input class="folder-picker-path-input" type="text" v-model="folderPickerPath" @keydown.enter="folderPickerGoToPath" placeholder="Enter path..." spellcheck="false" />
644
623
  </div>
624
+ <div v-if="workDirHistory.length > 0" class="folder-picker-recent">
625
+ <div class="folder-picker-recent-label">Recent</div>
626
+ <div
627
+ v-for="dir in workDirHistory" :key="dir"
628
+ :class="['folder-picker-recent-item', { active: dir === workDir }]"
629
+ @click="selectRecentDir(dir)"
630
+ :title="dir"
631
+ >
632
+ <svg viewBox="0 0 24 24" width="13" height="13"><path fill="currentColor" d="M13 3a9 9 0 0 0-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42A8.954 8.954 0 0 0 13 21a9 9 0 0 0 0-18zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/></svg>
633
+ <span class="folder-picker-recent-path">{{ dir }}</span>
634
+ <button
635
+ class="folder-picker-recent-remove"
636
+ @click.stop="removeWorkDirHistory(dir)"
637
+ title="Remove from history"
638
+ >&times;</button>
639
+ </div>
640
+ </div>
645
641
  <div class="folder-picker-list">
646
642
  <div v-if="folderPickerLoading" class="folder-picker-loading">
647
643
  <div class="history-loading-spinner"></div>
@@ -59,6 +59,15 @@ export function createSidebar(deps) {
59
59
  wsSend({ type: 'change_workdir', workDir: dir });
60
60
  }
61
61
 
62
+ function selectRecentDir(dir) {
63
+ if (dir === workDir.value) {
64
+ folderPickerOpen.value = false;
65
+ return;
66
+ }
67
+ folderPickerOpen.value = false;
68
+ wsSend({ type: 'change_workdir', workDir: dir });
69
+ }
70
+
62
71
  function removeWorkDirHistory(dir) {
63
72
  const list = workDirHistory.value.filter(d => d !== dir);
64
73
  workDirHistory.value = list;
@@ -246,6 +255,7 @@ export function createSidebar(deps) {
246
255
  requestSessionList, resumeSession, newConversation, toggleSidebar,
247
256
  deleteSession, confirmDeleteSession, cancelDeleteSession,
248
257
  addToWorkDirHistory, selectWorkDirHistory, removeWorkDirHistory, toggleWorkDirHistory,
258
+ selectRecentDir,
249
259
  openFolderPicker, folderPickerNavigateUp, folderPickerSelectItem,
250
260
  folderPickerEnter, folderPickerGoToPath, confirmFolderPicker,
251
261
  groupedSessions,
package/web/style.css CHANGED
@@ -1543,79 +1543,6 @@ body {
1543
1543
  cursor: not-allowed;
1544
1544
  }
1545
1545
 
1546
- .sidebar-workdir-actions {
1547
- display: flex;
1548
- gap: 4px;
1549
- }
1550
-
1551
- /* ── Workdir history dropdown ── */
1552
- .workdir-history-dropdown {
1553
- margin-top: 6px;
1554
- border: 1px solid var(--border);
1555
- border-radius: 6px;
1556
- background: var(--bg-secondary);
1557
- max-height: 200px;
1558
- overflow-y: auto;
1559
- }
1560
-
1561
- .workdir-history-item {
1562
- display: flex;
1563
- align-items: center;
1564
- padding: 6px 8px;
1565
- font-size: 0.75rem;
1566
- font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
1567
- color: var(--text-primary);
1568
- cursor: pointer;
1569
- transition: background 0.1s;
1570
- gap: 4px;
1571
- }
1572
-
1573
- .workdir-history-item:hover {
1574
- background: var(--bg-tertiary);
1575
- }
1576
-
1577
- .workdir-history-item.active {
1578
- color: var(--accent);
1579
- font-weight: 600;
1580
- }
1581
-
1582
- .workdir-history-item + .workdir-history-item {
1583
- border-top: 1px solid var(--border);
1584
- }
1585
-
1586
- .workdir-history-path {
1587
- flex: 1;
1588
- overflow: hidden;
1589
- text-overflow: ellipsis;
1590
- white-space: nowrap;
1591
- }
1592
-
1593
- .workdir-history-remove {
1594
- flex-shrink: 0;
1595
- display: none;
1596
- align-items: center;
1597
- justify-content: center;
1598
- width: 18px;
1599
- height: 18px;
1600
- background: none;
1601
- border: none;
1602
- border-radius: 3px;
1603
- color: var(--text-secondary);
1604
- font-size: 0.85rem;
1605
- cursor: pointer;
1606
- padding: 0;
1607
- line-height: 1;
1608
- }
1609
-
1610
- .workdir-history-item:hover .workdir-history-remove {
1611
- display: flex;
1612
- }
1613
-
1614
- .workdir-history-remove:hover {
1615
- color: var(--error);
1616
- background: rgba(239, 68, 68, 0.1);
1617
- }
1618
-
1619
1546
  /* ── Folder Picker Modal ── */
1620
1547
  .folder-picker-overlay {
1621
1548
  position: fixed;
@@ -1820,6 +1747,77 @@ body {
1820
1747
  cursor: not-allowed;
1821
1748
  }
1822
1749
 
1750
+ /* ── Folder Picker: Recent directories ── */
1751
+ .folder-picker-recent {
1752
+ border-bottom: 1px solid var(--border);
1753
+ padding: 6px 0;
1754
+ }
1755
+
1756
+ .folder-picker-recent-label {
1757
+ padding: 4px 16px 2px;
1758
+ font-size: 0.7rem;
1759
+ font-weight: 600;
1760
+ text-transform: uppercase;
1761
+ letter-spacing: 0.04em;
1762
+ color: var(--text-secondary);
1763
+ }
1764
+
1765
+ .folder-picker-recent-item {
1766
+ display: flex;
1767
+ align-items: center;
1768
+ gap: 8px;
1769
+ padding: 5px 16px;
1770
+ font-size: 0.82rem;
1771
+ cursor: pointer;
1772
+ color: var(--text-primary);
1773
+ transition: background 0.1s;
1774
+ user-select: none;
1775
+ }
1776
+
1777
+ .folder-picker-recent-item:hover {
1778
+ background: var(--bg-tertiary);
1779
+ }
1780
+
1781
+ .folder-picker-recent-item.active {
1782
+ color: var(--accent);
1783
+ }
1784
+
1785
+ .folder-picker-recent-item svg {
1786
+ flex-shrink: 0;
1787
+ color: var(--text-secondary);
1788
+ }
1789
+
1790
+ .folder-picker-recent-item.active svg {
1791
+ color: var(--accent);
1792
+ }
1793
+
1794
+ .folder-picker-recent-path {
1795
+ flex: 1;
1796
+ overflow: hidden;
1797
+ text-overflow: ellipsis;
1798
+ white-space: nowrap;
1799
+ }
1800
+
1801
+ .folder-picker-recent-remove {
1802
+ background: none;
1803
+ border: none;
1804
+ color: var(--text-secondary);
1805
+ font-size: 1rem;
1806
+ cursor: pointer;
1807
+ padding: 0 4px;
1808
+ line-height: 1;
1809
+ opacity: 0;
1810
+ transition: opacity 0.15s, color 0.15s;
1811
+ }
1812
+
1813
+ .folder-picker-recent-item:hover .folder-picker-recent-remove {
1814
+ opacity: 1;
1815
+ }
1816
+
1817
+ .folder-picker-recent-remove:hover {
1818
+ color: var(--error);
1819
+ }
1820
+
1823
1821
  /* ── File Upload: Attachment Bar ── */
1824
1822
  .attachment-bar {
1825
1823
  display: flex;