Skip to content

Commit b1bc708

Browse files
committed
little polish for spring chat agent
1 parent 25f8eef commit b1bc708

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

vscode-extensions/vscode-spring-boot/lib/copilot/springBootAgent.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ export default class SpringBootChatAgent {
4040
}
4141
const selectedProjectUri = Uri.file(selectedProject?.fsPath).toString();
4242

43-
// Fetch project related information from the Spring boot language server
43+
// Fetch project related information from the Spring Boot language server
4444
const bootProjInfo = await commands.executeCommand("sts/spring-boot/bootProjectInfo", selectedProjectUri) as BootProjectInfo;
4545
const projectContext = `
4646
Use the following project information for the solution: Please suggest code compatible with the project version.
4747
4848
Main Spring project name: ${bootProjInfo.name}
4949
Root Package name: ${bootProjInfo.mainClass.substring(0, bootProjInfo.mainClass.lastIndexOf('.'))}
5050
Build tool: ${bootProjInfo.buildTool}
51-
Spring boot version: ${bootProjInfo.springBootVersion}
51+
Spring Boot version: ${bootProjInfo.springBootVersion}
5252
Java version: ${bootProjInfo.javaVersion}
5353
User prompt: ${request.prompt}
5454
`;
@@ -105,5 +105,5 @@ export function activate(
105105
const agent = chat.createChatParticipant(PARTICIPANT_ID, async (request, context, progress, token) => {
106106
return springBootChatAgent.handlePrompts(request, context, progress, token);
107107
});
108-
agent.iconPath = Uri.joinPath(context.extensionUri, 'readme-imgs', 'spring-tools-icon.png');
108+
agent.iconPath = Uri.joinPath(context.extensionUri, 'readme-imgs', 'sts4-32.png');
109109
}

vscode-extensions/vscode-spring-boot/lib/copilot/system-ai-prompt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import CopilotRequest from "./copilotRequest"
22

3-
export const systemPrompt = `**Your task is to create Java source code for a Spring boot application. Follow these guidelines:**
3+
export const systemPrompt = `**Your task is to create Java source code for a Spring Boot application. Follow these guidelines:**
44
- IMPORTANT: CONCLUDE YOUR RESPONSE WITH THE MARKER \"//${CopilotRequest.DEFAULT_END_MARK}\" TO INDICATE END OF RESPONSE.
55
- Generate a pom.xml snippet that includes the necessary Spring Boot Starter dependencies such as "spring-boot-starter-jpa".
66
- Organize code into appropriate package. Use the Package name as the root package and place the files in sub-packages accordingly.
@@ -15,7 +15,7 @@ export const systemPrompt = `**Your task is to create Java source code for a Spr
1515
- Include an integration test if there are multiple architectural layers.
1616
`
1717

18-
export const systemBoot3Prompt = `For Spring boot 3 and above:
18+
export const systemBoot3Prompt = `For Spring Boot 3 and above:
1919
- IMPORTANT: For JPA related applications, the 'javax' package has been replaced with 'jakarta' package. All JPA-related imports should use 'jakarta.persistence' instead of 'javax.persistence'.
2020
\`\`\`
2121
"""

vscode-extensions/vscode-spring-boot/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
"chatParticipants": [
3838
{
3939
"id": "springboot.agent",
40-
"fullName": "Spring boot",
41-
"name": "springboot",
42-
"description": "Spring boot chat agent",
40+
"fullName": "Spring Tools",
41+
"name": "spring",
42+
"description": "Spring Tools chat agent",
4343
"commands": [
4444
{
4545
"name": "add",
5.76 KB
Loading
Binary file not shown.
2.79 KB
Loading

0 commit comments

Comments
 (0)