@agent-link/server 0.1.22 → 0.1.23
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 +1 -1
- package/web/app.js +18 -2
- package/web/style.css +16 -0
package/package.json
CHANGED
package/web/app.js
CHANGED
|
@@ -780,6 +780,16 @@ const App = {
|
|
|
780
780
|
loadFolderPickerDir(newPath);
|
|
781
781
|
}
|
|
782
782
|
|
|
783
|
+
function folderPickerGoToPath() {
|
|
784
|
+
const path = folderPickerPath.value.trim();
|
|
785
|
+
if (!path) {
|
|
786
|
+
loadFolderPickerDir('');
|
|
787
|
+
return;
|
|
788
|
+
}
|
|
789
|
+
folderPickerSelected.value = '';
|
|
790
|
+
loadFolderPickerDir(path);
|
|
791
|
+
}
|
|
792
|
+
|
|
783
793
|
function confirmFolderPicker() {
|
|
784
794
|
let path = folderPickerPath.value;
|
|
785
795
|
if (!path) return;
|
|
@@ -856,6 +866,11 @@ const App = {
|
|
|
856
866
|
agentName.value = msg.agent.name;
|
|
857
867
|
hostname.value = msg.agent.hostname || '';
|
|
858
868
|
workDir.value = msg.agent.workDir;
|
|
869
|
+
// If we have a saved workDir from a previous session, restore it
|
|
870
|
+
const savedDir = localStorage.getItem('agentlink-workdir');
|
|
871
|
+
if (savedDir && savedDir !== msg.agent.workDir) {
|
|
872
|
+
wsSend({ type: 'change_workdir', workDir: savedDir });
|
|
873
|
+
}
|
|
859
874
|
// Request session list once connected
|
|
860
875
|
requestSessionList();
|
|
861
876
|
} else {
|
|
@@ -1000,6 +1015,7 @@ const App = {
|
|
|
1000
1015
|
if (msg.dirPath != null) folderPickerPath.value = msg.dirPath;
|
|
1001
1016
|
} else if (msg.type === 'workdir_changed') {
|
|
1002
1017
|
workDir.value = msg.workDir;
|
|
1018
|
+
localStorage.setItem('agentlink-workdir', msg.workDir);
|
|
1003
1019
|
messages.value = [];
|
|
1004
1020
|
visibleLimit.value = 50;
|
|
1005
1021
|
messageIdCounter = 0;
|
|
@@ -1116,7 +1132,7 @@ const App = {
|
|
|
1116
1132
|
folderPickerOpen, folderPickerPath, folderPickerEntries,
|
|
1117
1133
|
folderPickerLoading, folderPickerSelected,
|
|
1118
1134
|
openFolderPicker, folderPickerNavigateUp, folderPickerSelectItem,
|
|
1119
|
-
folderPickerEnter, confirmFolderPicker,
|
|
1135
|
+
folderPickerEnter, folderPickerGoToPath, confirmFolderPicker,
|
|
1120
1136
|
// File attachments
|
|
1121
1137
|
attachments, fileInputRef, dragOver,
|
|
1122
1138
|
triggerFileInput, handleFileSelect, removeAttachment, formatFileSize,
|
|
@@ -1424,7 +1440,7 @@ const App = {
|
|
|
1424
1440
|
<button class="folder-picker-up" @click="folderPickerNavigateUp" :disabled="!folderPickerPath" title="Go to parent directory">
|
|
1425
1441
|
<svg viewBox="0 0 24 24" width="14" height="14"><path fill="currentColor" d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>
|
|
1426
1442
|
</button>
|
|
1427
|
-
<
|
|
1443
|
+
<input class="folder-picker-path-input" type="text" v-model="folderPickerPath" @keydown.enter="folderPickerGoToPath" placeholder="Enter path..." spellcheck="false" />
|
|
1428
1444
|
</div>
|
|
1429
1445
|
<div class="folder-picker-list">
|
|
1430
1446
|
<div v-if="folderPickerLoading" class="folder-picker-loading">
|
package/web/style.css
CHANGED
|
@@ -1495,6 +1495,22 @@ body {
|
|
|
1495
1495
|
flex: 1;
|
|
1496
1496
|
}
|
|
1497
1497
|
|
|
1498
|
+
.folder-picker-path-input {
|
|
1499
|
+
flex: 1;
|
|
1500
|
+
background: var(--bg-primary);
|
|
1501
|
+
color: var(--text-primary);
|
|
1502
|
+
border: 1px solid var(--border);
|
|
1503
|
+
border-radius: 4px;
|
|
1504
|
+
padding: 4px 8px;
|
|
1505
|
+
font-size: 0.85rem;
|
|
1506
|
+
font-family: monospace;
|
|
1507
|
+
outline: none;
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
.folder-picker-path-input:focus {
|
|
1511
|
+
border-color: var(--accent);
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1498
1514
|
.folder-picker-list {
|
|
1499
1515
|
flex: 1;
|
|
1500
1516
|
overflow-y: auto;
|