mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-31 23:55:23 +00:00
fix(tmux): pass full session info to the terminal's session picker (#1552)
The tmux.sessions service reduced detected sessions to bare names, but the picker reads session.name, so every entry rendered blank and selecting one sent an empty name, which created a new session instead of attaching.
This commit is contained in:
1 parent
ab7a68aa84
commit
57151c0e84
3 files changed
+31
-14
No files matched your search
@@ -4,12 +4,10 @@ import {
|
||||
attachOrCreateTmuxSession,
|
||||
detectTmux,
|
||||
waitForTmuxSession,
|
||||
type TmuxDetectionResult,
|
||||
} from "./tmux-commands.js";
|
||||
|
||||
export interface TmuxDetection {
|
||||
available: boolean;
|
||||
sessions: string[];
|
||||
}
|
||||
export type TmuxDetection = TmuxDetectionResult;
|
||||
|
||||
/**
|
||||
* What the terminal (ssh-terminal's optional "tmux.sessions" consumer) asks
|
||||
@@ -29,12 +27,8 @@ export interface TmuxSessionsV1 {
|
||||
|
||||
export function createTmuxSessionsService(ctx: PluginContext): TmuxSessionsV1 {
|
||||
return {
|
||||
async detect(client) {
|
||||
const result = await detectTmux(client as Client);
|
||||
return {
|
||||
available: result.available,
|
||||
sessions: result.sessions.map((s) => s.name),
|
||||
};
|
||||
detect(client) {
|
||||
return detectTmux(client as Client);
|
||||
},
|
||||
|
||||
async attachOrCreate(stream, name, newName, hostId) {
|
||||
|
||||
Reference in new issue
Block a user