Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: eclipse-theia/theia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f757be6f8fd1a27a237b30aeeba37f5669f5fd7e
Choose a base ref
..
head repository: eclipse-theia/theia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 39281f1603330781ed3ce98eb7c668fd39c93072
Choose a head ref
18 changes: 8 additions & 10 deletions .github/DISCUSSION_TEMPLATE/prompt-template-contribution.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: Prompt Template Submission
description: Submit a prompt template, detailing its functionality and tested results.
title: Prompt Template for <Agent Name> <Describe Functionality>
title: "Prompt Template for <Agent Name> <Describe Functionality>"
body:
- type: textarea
id: what_template_does
attributes:
label: What Does This Template Do?
description: Provide a brief description of the prompt template. What problem does it solve? What specific functionality and agent does it enhance and how?
description: Provide a brief description of the prompt template. What problem does it solve? What specific functionality and agent does it enhance and how?
placeholder: Enter a description of the template.
validations:
required: true
@@ -25,7 +23,7 @@ body:
attributes:
label: Tested LLMs
description: List the language models this template has been tested with, including versions, providers, and notable performance observations.
placeholder: |-
placeholder: |-
- LLM Name & Version (e.g., OpenAI GPT-4)
- Provider (e.g., OpenAI, llama-file, Ollama)
- Observations or challenges
@@ -37,7 +35,7 @@ body:
attributes:
label: Example User Requests
description: Provide some example user requests tested with this template.
placeholder: |-
placeholder: |-
1. Example Request 1: [User input]
2. Example Request 2: [User input]
3. Example Request 3: [User input]
@@ -76,7 +74,7 @@ body:
### Developer Certificate of Origin 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102, San Francisco, CA 94110 USA
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
@@ -85,9 +83,9 @@ body:
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I have the right to submit it under the open-source license indicated in the file; or
(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open-source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open-source license (unless I am permitted to submit under a different license), as indicated in the file; or
(c) The contribution was provided directly to me by some other person who certified (a), (b), or (c) and I have not modified it.
(a) The contribution was created in whole or in part by me and I have the right to submit it under the open-source license indicated in the file; or
(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open-source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open-source license (unless I am permitted to submit under a different license), as indicated in the file; or
(c) The contribution was provided directly to me by some other person who certified (a), (b), or (c) and I have not modified it.
(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my signoff) is maintained indefinitely and may be redistributed consistent with this project or the open-source license(s) involved.
Original file line number Diff line number Diff line change
@@ -84,7 +84,11 @@ export class ContainerConnectionContribution extends AbstractRemoteRegistryContr
}

async getOrSelectDevcontainerFile(): Promise<string | undefined> {
const devcontainerFiles = await this.connectionProvider.getDevContainerFiles();
const workspace = this.workspaceService.workspace;
if (!workspace) {
return;
}
const devcontainerFiles = await this.connectionProvider.getDevContainerFiles(workspace.resource.path.toString());

if (devcontainerFiles.length === 1) {
return devcontainerFiles[0].path;
Original file line number Diff line number Diff line change
@@ -46,6 +46,6 @@ export interface DevContainerFile {

export interface RemoteContainerConnectionProvider extends RpcServer<ContainerOutputProvider> {
connectToContainer(options: ContainerConnectionOptions): Promise<ContainerConnectionResult>;
getDevContainerFiles(): Promise<DevContainerFile[]>;
getDevContainerFiles(workspacePath: string): Promise<DevContainerFile[]>;
getCurrentContainerInfo(port: number): Promise<ContainerInspectInfo | undefined>;
}
Original file line number Diff line number Diff line change
@@ -38,12 +38,7 @@ export class DevContainerFileService {
return configuration;
}

async getAvailableFiles(): Promise<DevContainerFile[]> {
const workspace = await this.workspaceServer.getMostRecentlyUsedWorkspace();
if (!workspace) {
return [];
}

async getAvailableFiles(workspace: string): Promise<DevContainerFile[]> {
const devcontainerPath = new URI(workspace).path.join('.devcontainer').fsPath();

return (await this.searchForDevontainerJsonFiles(devcontainerPath, 1)).map(file => ({
@@ -54,7 +49,7 @@ export class DevContainerFileService {
}

protected async searchForDevontainerJsonFiles(directory: string, depth: number): Promise<string[]> {
if (depth < 0) {
if (depth < 0 || !fs.existsSync(directory)) {
return [];
}
const filesPaths = (await fs.readdir(directory)).map(file => new Path(directory).join(file).fsPath());
Original file line number Diff line number Diff line change
@@ -37,7 +37,10 @@ export class ImageFileContribution implements ContainerCreationContribution {
async handleContainerCreation(createOptions: Docker.ContainerCreateOptions, containerConfig: ImageContainer,
api: Docker, outputprovider: ContainerOutputProvider): Promise<void> {
if (containerConfig.image) {
await new Promise<void>((res, rej) => api.pull(containerConfig.image, {}, (err, stream) => {
const platform = process.platform;
const arch = process.arch;
const options = platform === 'darwin' && arch === 'arm64' ? { platform: 'amd64' } : {};
await new Promise<void>((res, rej) => api.pull(containerConfig.image, options, (err, stream) => {
if (err) {
rej(err);
} else {
Original file line number Diff line number Diff line change
@@ -121,8 +121,8 @@ export class DevContainerConnectionProvider implements RemoteContainerConnection
}
}

getDevContainerFiles(): Promise<DevContainerFile[]> {
return this.devContainerFileService.getAvailableFiles();
getDevContainerFiles(workspacePath: string): Promise<DevContainerFile[]> {
return this.devContainerFileService.getAvailableFiles(workspacePath);
}

async createContainerConnection(container: Docker.Container, docker: Docker, name?: string): Promise<RemoteDockerContainerConnection> {
Original file line number Diff line number Diff line change
@@ -167,6 +167,8 @@ export class RemoteSetupService {
arch = 'x64';
} else if (archResult.match(/i\d83/)) { // i386, i483, i683
arch = 'x86';
} else if (archResult.includes('aarch64')) {
arch = 'arm64';
} else {
arch = archResult.trim();
}