From a0a453d88323e295d75979466da7d2f1f76c5413 Mon Sep 17 00:00:00 2001 From: Jonas Helming Date: Thu, 21 Nov 2024 22:14:25 +0100 Subject: [PATCH] Fix prompt template contribution category and template (#14497) fixed #14496 Signed-off-by: Jonas Helming --- .../prompt-template-contribution.md | 66 ------------- .../prompt-template-contribution.yml | 95 +++++++++++++++++++ .../ai-chat/src/common/command-chat-agents.ts | 2 +- .../src/common/orchestrator-chat-agent.ts | 2 +- .../src/common/universal-chat-agent.ts | 2 +- .../src/common/code-completion-agent.ts | 2 +- .../src/browser/ai-terminal-agent.ts | 4 +- .../ai-workspace-agent/src/common/template.ts | 2 +- 8 files changed, 102 insertions(+), 73 deletions(-) delete mode 100644 .github/DISCUSSION_TEMPLATE/prompt-template-contribution.md create mode 100644 .github/DISCUSSION_TEMPLATE/prompt-template-contribution.yml diff --git a/.github/DISCUSSION_TEMPLATE/prompt-template-contribution.md b/.github/DISCUSSION_TEMPLATE/prompt-template-contribution.md deleted file mode 100644 index 78e1e573cf8c4..0000000000000 --- a/.github/DISCUSSION_TEMPLATE/prompt-template-contribution.md +++ /dev/null @@ -1,66 +0,0 @@ - - -## What Does This Template Do? - -Provide a brief description of the prompt template: -- What problem does it solve? -- What specific functionality does it enhance and how? - -## The Prompt Template - -Paste your prompt template here as plain text. - -## Tested LLMs - -List the language models this template has been tested with, and describe how well it worked: -- LLM Name & Version, e.g., OpenAI GPT-4, LLaMA 3.2, etc. -- Which LLM providers did you use (OpenAI, llama-file, Ollama, etc.) -- Any notable performance observations or challenges? - -## Example User Requests - -Provide some example user requests that were tested with this template: -1. Example Request 1: [What the user inputted] -2. Example Request 2: [Another example] -3. Example Request 3: [And so on...] - -## Suggestions for Improvements (Optional) - -If you’re looking for feedback or collaboration, feel free to add: -- Known limitations or challenges. -- Ideas for improving the template. - -## Related Discussions or Resources (Optional) - -Link to any relevant discussions, documentation, or resources that could help others understand or improve your template. - -## License Agreement - -By submitting this template, you agree to the following: - -1. Your submission is contributed under the [MIT License](https://opensource.org/licenses/MIT). -2. You certify that your contribution complies with the **Developer Certificate of Origin (DCO) Version 1.1**, outlined below: - ---- - -### Developer Certificate of Origin 1.1 - -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. - -#### Developer's Certificate of Origin 1.1 - -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. - -(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. - ---- - -- [ ] **I agree to contribute this submission under the MIT License and certify compliance with the Developer Certificate of Origin (DCO) Version 1.1.** - diff --git a/.github/DISCUSSION_TEMPLATE/prompt-template-contribution.yml b/.github/DISCUSSION_TEMPLATE/prompt-template-contribution.yml new file mode 100644 index 0000000000000..07062d6a13f6a --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/prompt-template-contribution.yml @@ -0,0 +1,95 @@ +name: Prompt Template Submission +description: Submit a prompt template, detailing its functionality and tested results. +title: Prompt Template for +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? + placeholder: Enter a description of the template. + validations: + required: true + + - type: textarea + id: prompt_template + attributes: + label: The Prompt Template + description: Paste your prompt template here as plain text. + placeholder: Enter the prompt template. + validations: + required: true + + - type: textarea + id: tested_llms + attributes: + label: Tested LLMs + description: List the language models this template has been tested with, including versions, providers, and notable performance observations. + placeholder: |- + - LLM Name & Version (e.g., OpenAI GPT-4) + - Provider (e.g., OpenAI, llama-file, Ollama) + - Observations or challenges + validations: + required: true + + - type: textarea + id: example_requests + attributes: + label: Example User Requests + description: Provide some example user requests tested with this template. + placeholder: |- + 1. Example Request 1: [User input] + 2. Example Request 2: [User input] + 3. Example Request 3: [User input] + validations: + required: true + + - type: textarea + id: improvement_suggestions + attributes: + label: Suggestions for Improvements (Optional) + description: Share any known limitations or ideas for improving the template. + placeholder: Describe any challenges or potential enhancements. + validations: + required: false + + - type: textarea + id: related_resources + attributes: + label: Related Discussions or Resources (Optional) + description: Link to any relevant discussions, documentation, or resources that could help others understand or improve your template. + placeholder: Provide URLs or references. + validations: + required: false + + - type: checkboxes + id: license_agreement + attributes: + label: License Agreement + description: By submitting this template, you agree to the following terms + options: + - label: | + By submitting this template, you agree to the following: + + 1. Your submission is contributed under the [MIT License](https://opensource.org/licenses/MIT). + 2. You certify that your contribution complies with the **Developer Certificate of Origin (DCO) Version 1.1**, outlined below: + + ### Developer Certificate of Origin 1.1 + + 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. + + #### Developer's Certificate of Origin 1.1 + + 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. + + (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. + + I agree to contribute this submission under the MIT License and certify compliance with the Developer Certificate of Origin (DCO) Version 1.1. + required: true diff --git a/packages/ai-chat/src/common/command-chat-agents.ts b/packages/ai-chat/src/common/command-chat-agents.ts index be758c06d72f8..d45fa8a75e80c 100644 --- a/packages/ai-chat/src/common/command-chat-agents.ts +++ b/packages/ai-chat/src/common/command-chat-agents.ts @@ -37,7 +37,7 @@ import { export const commandTemplate: PromptTemplate = { id: 'command-system', template: `{{!-- Made improvements or adaptations to this prompt template? We’d love for you to share it with the community! Contribute back here: -https://github.com/eclipse-theia/theia/discussions/new?category=show-and-tell&template=prompt-template-contribution.md --}} +https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}} # System Prompt You are a service that helps users find commands to execute in an IDE. diff --git a/packages/ai-chat/src/common/orchestrator-chat-agent.ts b/packages/ai-chat/src/common/orchestrator-chat-agent.ts index a9f3483e70cbe..3ca3420624721 100644 --- a/packages/ai-chat/src/common/orchestrator-chat-agent.ts +++ b/packages/ai-chat/src/common/orchestrator-chat-agent.ts @@ -28,7 +28,7 @@ import { ChatHistoryEntry } from './chat-history-entry'; export const orchestratorTemplate: PromptTemplate = { id: 'orchestrator-system', template: `{{!-- Made improvements or adaptations to this prompt template? We’d love for you to share it with the community! Contribute back here: -https://github.com/eclipse-theia/theia/discussions/new?category=show-and-tell&template=prompt-template-contribution.md --}} +https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}} # Instructions Your task is to identify which Chat Agent(s) should best reply a given user's message. diff --git a/packages/ai-chat/src/common/universal-chat-agent.ts b/packages/ai-chat/src/common/universal-chat-agent.ts index 4093cec0a6066..ab70242748795 100644 --- a/packages/ai-chat/src/common/universal-chat-agent.ts +++ b/packages/ai-chat/src/common/universal-chat-agent.ts @@ -24,7 +24,7 @@ import { AbstractStreamParsingChatAgent, ChatAgent, SystemMessageDescription } f export const universalTemplate: PromptTemplate = { id: 'universal-system', template: `{{!-- Made improvements or adaptations to this prompt template? We’d love for you to share it with the community! Contribute back here: -https://github.com/eclipse-theia/theia/discussions/new?category=show-and-tell&template=prompt-template-contribution.md --}} +https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}} # Instructions You are an AI assistant integrated into the Theia IDE, specifically designed to help software developers by diff --git a/packages/ai-code-completion/src/common/code-completion-agent.ts b/packages/ai-code-completion/src/common/code-completion-agent.ts index 694c6f454c31b..c47f5b6089957 100644 --- a/packages/ai-code-completion/src/common/code-completion-agent.ts +++ b/packages/ai-code-completion/src/common/code-completion-agent.ts @@ -135,7 +135,7 @@ export class CodeCompletionAgentImpl implements CodeCompletionAgent { { id: 'code-completion-prompt', template: `{{!-- Made improvements or adaptations to this prompt template? We’d love for you to share it with the community! Contribute back here: -https://github.com/eclipse-theia/theia/discussions/new?category=show-and-tell&template=prompt-template-contribution.md --}} +https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}} You are a code completion agent. The current file you have to complete is named {{file}}. The language of the file is {{language}}. Return your result as plain text without markdown formatting. Finish the following code snippet. diff --git a/packages/ai-terminal/src/browser/ai-terminal-agent.ts b/packages/ai-terminal/src/browser/ai-terminal-agent.ts index 02ad2b871b519..cdb6b8a916e19 100644 --- a/packages/ai-terminal/src/browser/ai-terminal-agent.ts +++ b/packages/ai-terminal/src/browser/ai-terminal-agent.ts @@ -56,7 +56,7 @@ export class AiTerminalAgent implements Agent { name: 'AI Terminal System Prompt', description: 'Prompt for the AI Terminal Assistant', template: `{{!-- Made improvements or adaptations to this prompt template? We’d love for you to share it with the community! Contribute back here: -https://github.com/eclipse-theia/theia/discussions/new?category=show-and-tell&template=prompt-template-contribution.md --}} +https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}} # Instructions Generate one or more command suggestions based on the user's request, considering the shell being used, the current working directory, and the recent terminal contents. Provide the best suggestion first, @@ -104,7 +104,7 @@ nothing to commit, working tree clean name: 'AI Terminal User Prompt', description: 'Prompt that contains the user request', template: `{{!-- Made improvements or adaptations to this prompt template? We’d love for you to share it with the community! Contribute back here: -https://github.com/eclipse-theia/theia/discussions/new?category=show-and-tell&template=prompt-template-contribution.md --}} +https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}} user-request: {{userRequest}} shell: {{shell}} cwd: {{cwd}} diff --git a/packages/ai-workspace-agent/src/common/template.ts b/packages/ai-workspace-agent/src/common/template.ts index a2a44702b9e5d..b93b62422f2de 100644 --- a/packages/ai-workspace-agent/src/common/template.ts +++ b/packages/ai-workspace-agent/src/common/template.ts @@ -19,7 +19,7 @@ import { GET_WORKSPACE_FILE_LIST_FUNCTION_ID, FILE_CONTENT_FUNCTION_ID, GET_WORK export const workspaceTemplate = { id: 'workspace-system', template: `{{!-- Made improvements or adaptations to this prompt template? We’d love for you to share it with the community! Contribute back here: -https://github.com/eclipse-theia/theia/discussions/new?category=show-and-tell&template=prompt-template-contribution.md --}} +https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}} # Instructions You are an AI assistant integrated into Theia IDE, designed to assist software developers with concise answers to programming-related questions. Your goal is to enhance