feat(terminal): continue Directory Picker with OSC 7 and reconnect fixes (#4113)

* feat(terminal): add Directory Picker context chip

* fix(terminal): bind directory reads to the exact SSH session

* fix(terminal): follow manually changed working directories

* fix(terminal): isolate cwd updates and gate local platform support

* docs(terminal): research Directory Picker cross-platform follow-up

* fix(terminal): confirm OSC 7 navigation and reset picker loading

* fix(terminal): preserve active shell OSC 7 during directory refresh

* test(terminal): retain cross-session OSC 7 submission guard

---------

Co-authored-by: Joseph Hau <hexart@gmail.com>
This commit is contained in:
陈大猫andJoseph Hau authored and GitHub committed 2026-11-05 23:44:37 +08:00
1 parent 2e3dc687cb
commit efe012e0c8
45 files changed
+2064 -9

No files matched your search

@@ -220,6 +220,19 @@ test("openSftpForSession keeps the SSH source session id when options include an
assert.equal(invoked[0].payload.expectedEndpoint.sessionId, "sftp-left-browse-session");
});
test('exact-session-only browse does not fabricate a credential profile', async () => {
const calls = [];
const api = createPreloadApi({ webUtils: {}, ipcRenderer: {
on() {}, removeListener() {},
async invoke(channel, payload) { calls.push({ channel, payload }); return { sftpId: 'channel', sourceSessionId: 'terminal' }; },
} });
assert.equal(await api.openSftpForSession('terminal', {
hostname: 'host', username: 'me', reuseExactSessionOnly: true, fileProtocol: 'sftp',
}), 'channel');
assert.equal(calls[0].payload.expectedEndpoint, undefined);
assert.equal(calls[0].payload.reuseExactSessionOnly, true);
});
test("strict openSftpForSession closes and rejects a mismatched source result", async () => {
const invoked = [];
const api = createPreloadApi({