Initialize remote IDE scaffold

This commit is contained in:
2026-05-10 14:08:25 +00:00
commit 138eea3231
97 changed files with 21129 additions and 0 deletions
@@ -0,0 +1,22 @@
import { CommandContribution, CommandRegistry } from '@theia/core/lib/common/command.js';
import { MenuContribution, MenuModelRegistry } from '@theia/core/lib/common/menu/menu-model-registry.js';
import { MessageService } from '@theia/core/lib/common/message-service.js';
import { ContainerModule } from '@theia/core/shared/inversify/index.js';
import { type IGitZoneOpenCodeServer } from '../common/gitzone-opencode-protocol.js';
export declare const GitZoneOpenCodeHealthCommand: {
id: string;
label: string;
};
export declare const GitZoneOpenCodeNewSessionCommand: {
id: string;
label: string;
};
export declare class GitZoneOpenCodeContribution implements CommandContribution, MenuContribution {
protected readonly openCodeServer: IGitZoneOpenCodeServer;
protected readonly messages: MessageService;
registerCommands(registry: CommandRegistry): void;
registerMenus(menus: MenuModelRegistry): void;
}
declare const _default: ContainerModule;
export default _default;
//# sourceMappingURL=gitzone-opencode-frontend-module.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"gitzone-opencode-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/gitzone-opencode-frontend-module.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAsB,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAIL,KAAK,sBAAsB,EAC5B,MAAM,wCAAwC,CAAC;AAEhD,eAAO,MAAM,4BAA4B;;;CAGxC,CAAC;AAEF,eAAO,MAAM,gCAAgC;;;CAG5C,CAAC;AAEF,qBACa,2BAA4B,YAAW,mBAAmB,EAAE,gBAAgB;IAEvF,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAG,sBAAsB,CAAC;IAG3D,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAG,cAAc,CAAC;IAE7C,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAejD,aAAa,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;CAU9C;;AAQD,wBAWG"}
@@ -0,0 +1,83 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GitZoneOpenCodeContribution = exports.GitZoneOpenCodeNewSessionCommand = exports.GitZoneOpenCodeHealthCommand = void 0;
const common_menus_js_1 = require("@theia/core/lib/browser/common-menus.js");
const ws_connection_provider_js_1 = require("@theia/core/lib/browser/messaging/ws-connection-provider.js");
const command_js_1 = require("@theia/core/lib/common/command.js");
const menu_model_registry_js_1 = require("@theia/core/lib/common/menu/menu-model-registry.js");
const message_service_js_1 = require("@theia/core/lib/common/message-service.js");
const index_js_1 = require("@theia/core/shared/inversify/index.js");
const gitzone_opencode_protocol_js_1 = require("../common/gitzone-opencode-protocol.js");
exports.GitZoneOpenCodeHealthCommand = {
id: 'gitzone.opencode.health',
label: 'OpenCode: Check Health',
};
exports.GitZoneOpenCodeNewSessionCommand = {
id: 'gitzone.opencode.newSession',
label: 'OpenCode: New Session',
};
let GitZoneOpenCodeContribution = class GitZoneOpenCodeContribution {
openCodeServer;
messages;
registerCommands(registry) {
registry.registerCommand(exports.GitZoneOpenCodeHealthCommand, {
execute: async () => {
const health = await this.openCodeServer.health();
await this.messages.info(`OpenCode health: ${JSON.stringify(health)}`);
},
});
registry.registerCommand(exports.GitZoneOpenCodeNewSessionCommand, {
execute: async () => {
const session = await this.openCodeServer.createSession('Git.Zone IDE Session');
await this.messages.info(`OpenCode session created: ${JSON.stringify(session)}`);
},
});
}
registerMenus(menus) {
menus.registerMenuAction(common_menus_js_1.CommonMenus.VIEW_VIEWS, {
commandId: exports.GitZoneOpenCodeHealthCommand.id,
label: exports.GitZoneOpenCodeHealthCommand.label,
});
menus.registerMenuAction(common_menus_js_1.CommonMenus.VIEW_VIEWS, {
commandId: exports.GitZoneOpenCodeNewSessionCommand.id,
label: exports.GitZoneOpenCodeNewSessionCommand.label,
});
}
};
exports.GitZoneOpenCodeContribution = GitZoneOpenCodeContribution;
__decorate([
(0, index_js_1.inject)(gitzone_opencode_protocol_js_1.GitZoneOpenCodeServer),
__metadata("design:type", Object)
], GitZoneOpenCodeContribution.prototype, "openCodeServer", void 0);
__decorate([
(0, index_js_1.inject)(message_service_js_1.MessageService),
__metadata("design:type", message_service_js_1.MessageService)
], GitZoneOpenCodeContribution.prototype, "messages", void 0);
exports.GitZoneOpenCodeContribution = GitZoneOpenCodeContribution = __decorate([
(0, index_js_1.injectable)()
], GitZoneOpenCodeContribution);
const openCodeClient = {
onOpenCodeEvent: (event) => {
globalThis.dispatchEvent(new CustomEvent('gitzone-opencode-event', { detail: event }));
},
};
exports.default = new index_js_1.ContainerModule((bind) => {
bind(gitzone_opencode_protocol_js_1.GitZoneOpenCodeServer)
.toDynamicValue((context) => context.container
.get(ws_connection_provider_js_1.WebSocketConnectionProvider)
.createProxy(gitzone_opencode_protocol_js_1.gitZoneOpenCodePath, openCodeClient))
.inSingletonScope();
bind(GitZoneOpenCodeContribution).toSelf().inSingletonScope();
bind(command_js_1.CommandContribution).toService(GitZoneOpenCodeContribution);
bind(menu_model_registry_js_1.MenuContribution).toService(GitZoneOpenCodeContribution);
});
//# sourceMappingURL=gitzone-opencode-frontend-module.js.map
@@ -0,0 +1 @@
{"version":3,"file":"gitzone-opencode-frontend-module.js","sourceRoot":"","sources":["../../src/browser/gitzone-opencode-frontend-module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6EAAsE;AACtE,2GAA0G;AAC1G,kEAAyF;AACzF,+FAAyG;AACzG,kFAA2E;AAC3E,oEAA4F;AAC5F,yFAKgD;AAEnC,QAAA,4BAA4B,GAAG;IAC1C,EAAE,EAAE,yBAAyB;IAC7B,KAAK,EAAE,wBAAwB;CAChC,CAAC;AAEW,QAAA,gCAAgC,GAAG;IAC9C,EAAE,EAAE,6BAA6B;IACjC,KAAK,EAAE,uBAAuB;CAC/B,CAAC;AAGK,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IAEnB,cAAc,CAA0B;IAGxC,QAAQ,CAAkB;IAE7C,gBAAgB,CAAC,QAAyB;QACxC,QAAQ,CAAC,eAAe,CAAC,oCAA4B,EAAE;YACrD,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC;gBAClD,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACzE,CAAC;SACF,CAAC,CAAC;QACH,QAAQ,CAAC,eAAe,CAAC,wCAAgC,EAAE;YACzD,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC;gBAChF,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,6BAA6B,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACnF,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,KAAwB;QACpC,KAAK,CAAC,kBAAkB,CAAC,6BAAW,CAAC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