Skip to content

Commit

Permalink
Fix prompt template contribution category and template (#14497)
Browse files Browse the repository at this point in the history
fixed #14496

Signed-off-by: Jonas Helming <[email protected]>
  • Loading branch information
JonasHelming authored Nov 21, 2024
1 parent 7b0bd4f commit a0a453d
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 73 deletions.
66 changes: 0 additions & 66 deletions .github/DISCUSSION_TEMPLATE/prompt-template-contribution.md

This file was deleted.

95 changes: 95 additions & 0 deletions .github/DISCUSSION_TEMPLATE/prompt-template-contribution.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Prompt Template Submission
description: Submit a prompt template, detailing its functionality and tested results.
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?
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
2 changes: 1 addition & 1 deletion packages/ai-chat/src/common/command-chat-agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-chat/src/common/orchestrator-chat-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-chat/src/common/universal-chat-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions packages/ai-terminal/src/browser/ai-terminal-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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}}
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-workspace-agent/src/common/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { GET_WORKSPACE_FILE_LIST_FUNCTION_ID, FILE_CONTENT_FUNCTION_ID, GET_WORK
export const workspaceTemplate = <PromptTemplate>{
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
Expand Down

0 comments on commit a0a453d

Please sign in to comment.