⚡ perf(vscode): 代码阅读预览发给页面的块只记相对位置:块在源码里占的地方记成离前一块多远、自己多长,块里名字的下标从块的开头算,页面从文件开头累加回文件里的位置、和扩展端打交道的地方都在一处换算;靠前改了代码,后面内容没变的块发过去一模一样,扩展端自己的块和发给页面的块分成两种类型
This commit is contained in:
1 parent
3a2815c19c
commit
ad5f559e92
43 files changed
+980
-424
No files matched your search
@@ -7,6 +7,7 @@ import { act } from 'react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import { App } from './App'
|
||||
import { NO_SPAN } from './testBlocks'
|
||||
import { createViewStateStore } from './viewState'
|
||||
|
||||
/**
|
||||
@@ -118,8 +119,7 @@ function block(id: string, anchor: string): BlockView {
|
||||
anchor,
|
||||
kind: 'function',
|
||||
callTree: {},
|
||||
startLine: 0,
|
||||
endLine: 1,
|
||||
span: NO_SPAN,
|
||||
attributes: { kind: 'function' },
|
||||
concepts: [{ id: 'function', label: 'function', icon: 'braces' }],
|
||||
children: [],
|
||||
|
||||
Reference in new issue
Block a user