Skip to content

Commit 7190f91

Browse files
authored
Add project info prompt fragment (#15449)
fixed #15448
1 parent b767004 commit 7190f91

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

.prompts/project-info.prompttemplate

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Theia Project Information
2+
3+
This section contains informations specific about the Theia Project and code base, which the user is currenty working on.
4+
5+
### Architecture overview
6+
7+
Theia has a modular architecture and consists of so-called "Theia extensions", which are technically node packages.
8+
Most features and generally the source code can be found under "/packages/" which hosts a list of Theia extensions for different sorts of features.
9+
Theia applications can be used in the browser or (via Electron) on the desktop, but generally have a front end (browser application) and a backend part (node application).
10+
Therefore, extensions can contribute to the front end and the backend. This is reflected in the folder structure of extensions:
11+
- src/browser: Frontend part of an extensions
12+
- src/node: Backend part of an extension.
13+
- src/common: Common/shared components, interfaces and protocol information for front end back end communication
14+
15+
Theia uses dependency injection (via inversify) to wired components. If a class is contributed via dependency injection it needs to be bound in the corresponding frontend or
16+
backend module (which usually already exists in existing packages)

packages/ai-ide/src/browser/workspace-preferences.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const WorkspacePreferencesSchema: PreferenceSchema = {
5151
description: nls.localize('theia/ai/promptTemplates/directories/description',
5252
'List of relative paths indicating folders in the current workspace to be scanned for WORKSPACE specific prompt templates. ' +
5353
CONFLICT_RESOLUTION_DESCRIPTION),
54-
default: [],
54+
default: ['.prompts'],
5555
items: {
5656
type: 'string'
5757
}

packages/ai-ide/src/common/architect-prompt-template.ts

+2
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,7 @@ Use the following functions to interact with the workspace files as needed:
4040
The following files have been provided for additional context. Some of them may also be referred to by the user. \
4141
Always look at the relevant files to understand your task using the function ~{${FILE_CONTENT_FUNCTION_ID}}.
4242
{{${CONTEXT_FILES_VARIABLE_ID}}}
43+
44+
{{prompt:project-info}}
4345
`
4446
};

packages/ai-ide/src/common/coder-replace-prompt-template.ts

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ Always look at the relevant files to understand your task using the function ~{$
6161
## Previously Proposed Changes
6262
You have previously proposed changes for the following files. Some suggestions may have been accepted by the user, while others may still be pending.
6363
{{${CHANGE_SET_SUMMARY_VARIABLE_ID}}}
64+
65+
{{prompt:project-info}}
6466
`,
6567
...(!withSearchAndReplace ? { variantOf: CODER_REPLACE_PROMPT_TEMPLATE_ID } : {}),
6668
};

0 commit comments

Comments
 (0)