This commit is contained in:
Andrew Pareles 2025-03-17 22:25:41 -07:00
parent b1e50798d8
commit 4cf79f7a3b
3 changed files with 8 additions and 12 deletions

View file

@ -1311,10 +1311,8 @@ class EditCodeService extends Disposable implements IEditCodeService {
if (!uri_) return if (!uri_) return
uri = uri_ uri = uri_
await this._voidModelService.initializeModel(uri) await this._voidModelService.initializeModel(uri)
console.log('initd2')
const { model } = this._voidModelService.getModel(uri) const { model } = this._voidModelService.getModel(uri)
if (!model) return if (!model) return
console.log('a2')
currentFileStr = model.getValue(EndOfLinePreference.LF) currentFileStr = model.getValue(EndOfLinePreference.LF)
const numLines = model.getLineCount() const numLines = model.getLineCount()
@ -1335,10 +1333,8 @@ class EditCodeService extends Disposable implements IEditCodeService {
const { startLine: startLine_, endLine: endLine_, _URI } = ctrlKZone const { startLine: startLine_, endLine: endLine_, _URI } = ctrlKZone
uri = _URI uri = _URI
await this._voidModelService.initializeModel(uri) await this._voidModelService.initializeModel(uri)
console.log('initd3')
const { model } = this._voidModelService.getModel(uri) const { model } = this._voidModelService.getModel(uri)
if (!model) return if (!model) return
console.log('a3')
currentFileStr = model.getValue(EndOfLinePreference.LF) currentFileStr = model.getValue(EndOfLinePreference.LF)
startLine = startLine_ startLine = startLine_
@ -1553,12 +1549,9 @@ class EditCodeService extends Disposable implements IEditCodeService {
} }
await this._voidModelService.initializeModel(uri) await this._voidModelService.initializeModel(uri)
console.log('initd')
const { model } = this._voidModelService.getModel(uri) const { model } = this._voidModelService.getModel(uri)
if (!model) return if (!model) return
console.log('a')
// generate search/replace block text // generate search/replace block text
const originalFileCode = model.getValue(EndOfLinePreference.LF) const originalFileCode = model.getValue(EndOfLinePreference.LF)
@ -1823,7 +1816,6 @@ class EditCodeService extends Disposable implements IEditCodeService {
}, },
onFinalMessage: async (params) => { onFinalMessage: async (params) => {
const { fullText } = params const { fullText } = params
console.log('final message!!', fullText)
// 1. wait 500ms and fix lint errors - call lint error workflow // 1. wait 500ms and fix lint errors - call lint error workflow
// (update react state to say "Fixing errors") // (update react state to say "Fixing errors")

View file

@ -183,7 +183,9 @@ const RenderToken = ({ token, inPTag, codeURI, chatMessageLocation, tokenIdx, ..
const HeadingTag = `h${t.depth}` as keyof JSX.IntrinsicElements const HeadingTag = `h${t.depth}` as keyof JSX.IntrinsicElements
return <HeadingTag>{t.text}</HeadingTag> return <HeadingTag>
<ChatMarkdownRender chatMessageLocation={chatMessageLocation} string={t.text} inPTag={true} codeURI={codeURI} {...options} />
</HeadingTag>
} }
if (t.type === "table") { if (t.type === "table") {

View file

@ -985,8 +985,9 @@ const SmallProseWrapper = ({ children }: { children: React.ReactNode }) => {
prose-h4:text-[13px] prose-h4:text-[13px]
prose-h4:my-2 prose-h4:my-2
prose-p:my-1 prose-p:my-2
prose-p:leading-snug prose-p:leading-snug
prose-hr:my-2
prose-ul:my-2 prose-ul:my-2
prose-ul:pl-4 prose-ul:pl-4
@ -994,6 +995,7 @@ const SmallProseWrapper = ({ children }: { children: React.ReactNode }) => {
prose-ul:list-disc prose-ul:list-disc
prose-ul:leading-snug prose-ul:leading-snug
prose-ol:my-2 prose-ol:my-2
prose-ol:pl-4 prose-ol:pl-4
prose-ol:list-outside prose-ol:list-outside
@ -1026,6 +1028,7 @@ const ProseWrapper = ({ children }: { children: React.ReactNode }) => {
prose-sm prose-sm
break-words break-words
prose-p:block prose-p:block
prose-hr:my-4
prose-pre:my-2 prose-pre:my-2
marker:text-inherit marker:text-inherit
prose-ol:list-outside prose-ol:list-outside
@ -1041,6 +1044,7 @@ const ProseWrapper = ({ children }: { children: React.ReactNode }) => {
prose-p:leading-normal prose-p:leading-normal
prose-ol:leading-normal prose-ol:leading-normal
prose-ul:leading-normal prose-ul:leading-normal
max-w-none max-w-none
' '
> >
@ -1874,12 +1878,10 @@ const VoidCommandBar = () => {
} }
export const SidebarChat = () => { export const SidebarChat = () => {
const textAreaRef = useRef<HTMLTextAreaElement | null>(null) const textAreaRef = useRef<HTMLTextAreaElement | null>(null)
const textAreaFnsRef = useRef<TextAreaFns | null>(null) const textAreaFnsRef = useRef<TextAreaFns | null>(null)
const accessor = useAccessor() const accessor = useAccessor()
// const modelService = accessor.get('IModelService')
const commandService = accessor.get('ICommandService') const commandService = accessor.get('ICommandService')
const chatThreadsService = accessor.get('IChatThreadService') const chatThreadsService = accessor.get('IChatThreadService')