Frontend uudelleenrakennettu: Astro-komponentit, Wasm pääsäikeessä, ei Workeria

Vanha frontend siirretty temp/. Uusi rakenne:
- StatusBar.astro, Terminal.astro, Editor.astro, Guide.astro
- global.css erillinen
- Wasm pääsäikeessä (ei Worker — yksinkertainen, debugattava)
- Tab-completion, dropdown, projektikortti, Monaco, GUIDE.md
- Ei tokenisointia eikä koodilaboratoriota

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jaakko Vanhala
2026-04-09 20:17:39 +03:00
parent e3fdb91ac5
commit a8c4af0975
9617 changed files with 996171 additions and 5349 deletions

View File

@@ -0,0 +1,21 @@
import type { Logger } from '../../../core/logger/core.js';
import type { CommandExecutor, OperatingSystemProvider } from '../../definitions.js';
import type { CloudIdeProvider } from '../definitions.js';
interface Options {
url: string;
operatingSystemProvider: OperatingSystemProvider;
logger: Logger;
commandExecutor: CommandExecutor;
cloudIdeProvider: CloudIdeProvider;
}
export declare const openDocsCommand: {
help: {
commandName: string;
tables: {
Flags: [string, string][];
};
description: string;
};
run({ url, operatingSystemProvider, logger, commandExecutor, cloudIdeProvider }: Options): Promise<void>;
};
export {};

View File

@@ -0,0 +1,42 @@
import { defineCommand } from "../../domain/command.js";
function getExecInputForPlatform(platform) {
switch (platform) {
case "android":
case "linux":
return ["xdg-open"];
case "darwin":
return ["open"];
case "win32":
return ["cmd", ["/c", "start"]];
case "gitpod":
return ["/ide/bin/remote-cli/gitpod-code", ["--openExternal"]];
default:
return null;
}
}
const openDocsCommand = defineCommand({
help: {
commandName: "astro docs",
tables: {
Flags: [["--help (-h)", "See all available flags."]]
},
description: `Launches the Astro Docs website directly from the terminal.`
},
async run({ url, operatingSystemProvider, logger, commandExecutor, cloudIdeProvider }) {
const platform = cloudIdeProvider.name ?? operatingSystemProvider.name;
const input = getExecInputForPlatform(platform);
if (!input) {
logger.error(
"SKIP_FORMAT",
`It looks like your platform ("${platform}") isn't supported!
To view Astro's docs, please visit ${url}`
);
return;
}
const [command, args = []] = input;
await commandExecutor.execute(command, [...args, encodeURI(url)]);
}
});
export {
openDocsCommand
};

View File

@@ -0,0 +1,4 @@
import type { CloudIde } from './domain/cloud-ide.js';
export interface CloudIdeProvider {
readonly name: CloudIde | null;
}

View File

View File

@@ -0,0 +1 @@
export type CloudIde = 'gitpod';

View File

@@ -0,0 +1,5 @@
import type { CloudIdeProvider } from '../definitions.js';
import type { CloudIde } from '../domain/cloud-ide.js';
export declare class ProcessCloudIdeProvider implements CloudIdeProvider {
readonly name: CloudIde | null;
}

View File

@@ -0,0 +1,6 @@
class ProcessCloudIdeProvider {
name = Boolean(process.env.GITPOD_REPO_ROOT) ? "gitpod" : null;
}
export {
ProcessCloudIdeProvider
};