mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
misc fixes
This commit is contained in:
parent
b86356d2af
commit
cc4115c8c4
4 changed files with 10 additions and 16 deletions
|
|
@ -1285,7 +1285,6 @@ class EditCodeService extends Disposable implements IEditCodeService {
|
|||
}
|
||||
|
||||
|
||||
console.log('DONE WITH _STARTSTREAMING', diffZone)
|
||||
return { diffZone, onFinishEdit }
|
||||
}
|
||||
|
||||
|
|
@ -1773,7 +1772,7 @@ class EditCodeService extends Disposable implements IEditCodeService {
|
|||
onFinalMessage: async (params) => {
|
||||
const { fullText } = params
|
||||
|
||||
console.log('DONE!', fullText)
|
||||
console.log('DONE - editCode!', fullText)
|
||||
|
||||
// 1. wait 500ms and fix lint errors - call lint error workflow
|
||||
// (update react state to say "Fixing errors")
|
||||
|
|
|
|||
|
|
@ -301,18 +301,13 @@ const RenderToken = ({ token, inPTag, codeURI, chatMessageLocation, tokenIdx, ..
|
|||
</>
|
||||
|
||||
if (inPTag) return <span className='block'>{contents}</span>
|
||||
|
||||
return <p>
|
||||
{contents}
|
||||
</p>
|
||||
return <p>{contents}</p>
|
||||
}
|
||||
|
||||
if (t.type === "html") {
|
||||
return (
|
||||
<p>
|
||||
{t.raw}
|
||||
</p>
|
||||
)
|
||||
const contents = t.raw
|
||||
if (inPTag) return <span className='block'>{contents}</span>
|
||||
return <p>{contents}</p>
|
||||
}
|
||||
|
||||
if (t.type === "text" || t.type === "escape") {
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ import { EndOfLinePreference } from '../../../../../editor/common/model.js';
|
|||
export const tripleTick = ['```', '```']
|
||||
|
||||
export const editToolDesc_toolDescription = `\
|
||||
A high level description of the change you'd like to make in the file. \
|
||||
Your output should be of the form:\n${tripleTick[0]}\n// ... existing code ...\n{{change 1}}\n// ... existing code ...\n{{change2}}\n// ... existing code ...\n{{change 3}}\n...\n${tripleTick[1]}. \
|
||||
(wrap your output in triple backticks). Do NOT output the whole file here, and write as little as possible. If a change seems big, break it up into smaller edits. \
|
||||
Your description will be handed to a dumber, faster model that will quickly apply the change, so try to be brief, but also make sure to include enough information to accurately describe the change.`
|
||||
Your description should be of the form:\n${tripleTick[0]}\n// ... existing code ...\n{{change 1}}\n// ... existing code ...\n{{change2}}\n// ... existing code ...\n{{change 3}}\n...\n${tripleTick[1]}. \
|
||||
Do NOT re-write the whole file, and instead use comments like // ... existing code ... . Write as little as possible. \
|
||||
Your description will be handed to a dumber, faster model that will quickly apply the change, so try to be brief, but also make sure to include enough information to accurately describe the change. \
|
||||
Include the triple ticks in your output.`
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ export const voidTools = {
|
|||
|
||||
edit: { // APPLY TOOL
|
||||
name: 'edit',
|
||||
description: `Edits the contents of a file at the given URI. Fails gracefully if the file does not exist.`,
|
||||
description: `Edits the contents of a file, given the file's URI and a description. Fails gracefully if the file does not exist.`,
|
||||
params: {
|
||||
uri: { type: 'string', description: undefined },
|
||||
changeDescription: { type: 'string', description: editToolDesc_toolDescription } // long description here
|
||||
|
|
|
|||
Loading…
Reference in a new issue