feat: add desktop LAN access setting
This commit is contained in:
@@ -85,6 +85,9 @@ export const createSettingsHelpers = (dependencies) => {
|
||||
const normalized = normalizeDirectoryPath(candidate.opencodeBinary).trim();
|
||||
result.opencodeBinary = normalized;
|
||||
}
|
||||
if (typeof candidate.desktopLanAccessEnabled === 'boolean') {
|
||||
result.desktopLanAccessEnabled = candidate.desktopLanAccessEnabled;
|
||||
}
|
||||
if (Array.isArray(candidate.projects)) {
|
||||
const projects = sanitizeProjects(candidate.projects);
|
||||
if (projects) {
|
||||
|
||||
@@ -40,4 +40,15 @@ describe('settings helpers', () => {
|
||||
|
||||
expect(helpers.sanitizeSettingsUpdate({ messageStreamTransport: 'websocket' })).toEqual({});
|
||||
});
|
||||
|
||||
it('accepts desktopLanAccessEnabled as a persisted shared setting', () => {
|
||||
const helpers = createTestHelpers();
|
||||
|
||||
expect(helpers.sanitizeSettingsUpdate({ desktopLanAccessEnabled: true })).toEqual({
|
||||
desktopLanAccessEnabled: true,
|
||||
});
|
||||
expect(helpers.sanitizeSettingsUpdate({ desktopLanAccessEnabled: false })).toEqual({
|
||||
desktopLanAccessEnabled: false,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user