Compare commits

...

5 Commits
0.2.2 ... main

Author SHA1 Message Date
Christopher
a1a8c44824 Release 0.2.3 2023-07-03 13:54:20 -04:00
Iheuzio
8261a1291e
Merge pull request #39 from Iheuzio/dev
Release 0.2.3
2023-07-03 13:51:42 -04:00
Iheuzio
f96b85d43c
Merge pull request #38 from Iheuzio/fix/display-html
fix(display-html): html is now properly displayed
2023-07-03 13:45:41 -04:00
Christopher
1af14cabd3 update version 2023-07-03 13:45:09 -04:00
Christopher
08a84fbfcd fix(display-html): html is now properly displayed 2023-07-03 13:42:48 -04:00
5 changed files with 21 additions and 6 deletions

View File

@ -4,6 +4,15 @@ Version History
## [Unreleased]
## [Release 0.2.3]
## What's Changed
* fix(display-html): html is now properly displayed by @Iheuzio in https://github.com/Iheuzio/gpt-contextfiles/pull/38
* Release 0.2.3 by @Iheuzio in https://github.com/Iheuzio/gpt-contextfiles/pull/39
**Full Changelog**: https://github.com/Iheuzio/gpt-contextfiles/compare/0.2.2...0.2.3
## [Release 0.2.2]
## What's Changed

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "gpt-contextfiles",
"version": "0.2.1",
"version": "0.2.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "gpt-contextfiles",
"version": "0.2.1",
"version": "0.2.3",
"dependencies": {
"openai": "^3.3.0"
},

View File

@ -2,7 +2,7 @@
"name": "gpt-contextfiles",
"displayName": "GPT-ContextFiles",
"description": "Choose the files to pass into GPT to provide a question with multiple files",
"version": "0.2.2",
"version": "0.2.3",
"engines": {
"vscode": "^1.79.0"
},

View File

@ -39,7 +39,7 @@ async function handleQuestionSubmission(panel, question, selectedUris) {
const chatCompletion = await openai.createChatCompletion({
model: "gpt-3.5-turbo-16k",
messages: [
{ role: "system", content: "Answer the coding questions, only provide the code and documentation, explaining the solution after providing the code." },
{ role: "system", content: "Answer the coding questions, only provide the code and documentation, explaining the solution after providing the code. Put codeblocks inside ``` code ``` with file names above each snippet." },
{ role: "user", content: question + "\n" + fileContents},
],
});

View File

@ -304,13 +304,19 @@ function getWebviewContent(apiResponse = '', question = '') {
</div>
<div class="content" id="api-response">
<div id="question-rep">
<p>${question ? '> ' + question : null}</p>
<p>${
question = question.replace(/</g, '&lt;').replace(/>/g, '&gt;'),
question ? '> ' + question : null
}</p>
</div>
${
apiResponse ? `
<div id="rendered">
<p id="responses">
<pre id="response">${apiResponse.replace(/```([^```]+)```/g, '<div id="code-block"><code>$1</code><button onclick="copyCode(event)" id="copy-button">copy</button></div>')}</pre>
<pre id="response">${
apiResponse = apiResponse.replace(/</g, '&lt;').replace(/>/g, '&gt;'),
apiResponse.replace(/```([^```]+)```/g, '<div id="code-block"><code>$1</code><button onclick="copyCode(event)" id="copy-button">copy</button></div>')
}</pre>
</p>
</div>
` : null