mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 00:49:41 +02:00
fix: COD-24 stabilize remote host sessions
This commit is contained in:
committed by
Aamer Akhter
parent
568d93efb0
commit
26e78daf58
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { Session } from '../src/session.js';
|
||||
import { resolveMuxAttachCwd, Session } from '../src/session.js';
|
||||
import type { SessionAttachmentHistoryItem } from '../src/types/session.js';
|
||||
import {
|
||||
ATTACHMENT_HISTORY_LIMIT,
|
||||
@@ -161,4 +161,17 @@ describe('session attachment history', () => {
|
||||
expect(persisted).toHaveLength(1);
|
||||
expect(persisted?.[0].fileName).toBe('ok.png');
|
||||
});
|
||||
|
||||
it('attaches remote mux sessions from a local cwd', () => {
|
||||
expect(
|
||||
resolveMuxAttachCwd('/Users/remote/project', {
|
||||
hostId: 'mac-mini',
|
||||
label: 'Mac Mini',
|
||||
host: '192.168.21.109',
|
||||
username: 'saqebakhter',
|
||||
remotePath: '/Users/remote/project',
|
||||
})
|
||||
).toBe('/tmp');
|
||||
expect(resolveMuxAttachCwd('/opt/projects/Codeman')).toBe('/opt/projects/Codeman');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user