misc fixes

This commit is contained in:
Andrew Pareles 2025-03-20 04:19:33 -07:00
parent b86356d2af
commit cc4115c8c4
4 changed files with 10 additions and 16 deletions

View file

@ -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")

View file

@ -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") {

View file

@ -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.`

View file

@ -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