mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
remove applybox stuff from editCode
This commit is contained in:
parent
16f6181395
commit
ea10765abd
1 changed files with 2 additions and 10 deletions
|
|
@ -128,12 +128,10 @@ export type StartApplyingOpts = {
|
||||||
from: 'QuickEdit';
|
from: 'QuickEdit';
|
||||||
type: 'rewrite';
|
type: 'rewrite';
|
||||||
diffareaid: number; // id of the CtrlK area (contains text selection)
|
diffareaid: number; // id of the CtrlK area (contains text selection)
|
||||||
chatApplyBoxId: string | null;
|
|
||||||
} | {
|
} | {
|
||||||
from: 'ClickApply';
|
from: 'ClickApply';
|
||||||
type: 'searchReplace' | 'rewrite';
|
type: 'searchReplace' | 'rewrite';
|
||||||
applyStr: string;
|
applyStr: string;
|
||||||
chatApplyBoxId: string | null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -177,7 +175,6 @@ type CommonZoneProps = {
|
||||||
type CtrlKZone = {
|
type CtrlKZone = {
|
||||||
type: 'CtrlKZone';
|
type: 'CtrlKZone';
|
||||||
originalCode?: undefined;
|
originalCode?: undefined;
|
||||||
chatApplyBoxId?: undefined;
|
|
||||||
|
|
||||||
editorId: string; // the editor the input lives on
|
editorId: string; // the editor the input lives on
|
||||||
|
|
||||||
|
|
@ -197,7 +194,6 @@ type DiffZone = {
|
||||||
type: 'DiffZone',
|
type: 'DiffZone',
|
||||||
originalCode: string;
|
originalCode: string;
|
||||||
_diffOfId: Record<string, Diff>; // diffid -> diff in this DiffArea
|
_diffOfId: Record<string, Diff>; // diffid -> diff in this DiffArea
|
||||||
chatApplyBoxId: string | null;
|
|
||||||
_streamState: {
|
_streamState: {
|
||||||
isStreaming: true;
|
isStreaming: true;
|
||||||
streamRequestIdRef: { current: string | null };
|
streamRequestIdRef: { current: string | null };
|
||||||
|
|
@ -220,7 +216,6 @@ type TrackingZone<T> = {
|
||||||
originalCode?: undefined;
|
originalCode?: undefined;
|
||||||
editorId?: undefined;
|
editorId?: undefined;
|
||||||
_removeStylesFns?: undefined;
|
_removeStylesFns?: undefined;
|
||||||
chatApplyBoxId?: undefined;
|
|
||||||
} & CommonZoneProps
|
} & CommonZoneProps
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -234,7 +229,6 @@ const diffAreaSnapshotKeys = [
|
||||||
'startLine',
|
'startLine',
|
||||||
'endLine',
|
'endLine',
|
||||||
'editorId',
|
'editorId',
|
||||||
'chatApplyBoxId',
|
|
||||||
|
|
||||||
] as const satisfies (keyof DiffArea)[]
|
] as const satisfies (keyof DiffArea)[]
|
||||||
|
|
||||||
|
|
@ -1268,7 +1262,7 @@ class EditCodeService extends Disposable implements IEditCodeService {
|
||||||
|
|
||||||
private _initializeWriteoverStream(opts: StartApplyingOpts): DiffZone | undefined {
|
private _initializeWriteoverStream(opts: StartApplyingOpts): DiffZone | undefined {
|
||||||
|
|
||||||
const { from, chatApplyBoxId } = opts
|
const { from } = opts
|
||||||
|
|
||||||
let startLine: number
|
let startLine: number
|
||||||
let endLine: number
|
let endLine: number
|
||||||
|
|
@ -1320,7 +1314,6 @@ class EditCodeService extends Disposable implements IEditCodeService {
|
||||||
|
|
||||||
const adding: Omit<DiffZone, 'diffareaid'> = {
|
const adding: Omit<DiffZone, 'diffareaid'> = {
|
||||||
type: 'DiffZone',
|
type: 'DiffZone',
|
||||||
chatApplyBoxId,
|
|
||||||
originalCode,
|
originalCode,
|
||||||
startLine,
|
startLine,
|
||||||
endLine,
|
endLine,
|
||||||
|
|
@ -1454,7 +1447,7 @@ class EditCodeService extends Disposable implements IEditCodeService {
|
||||||
|
|
||||||
|
|
||||||
private _initializeSearchAndReplaceStream(opts: StartApplyingOpts & { from: 'ClickApply' }) {
|
private _initializeSearchAndReplaceStream(opts: StartApplyingOpts & { from: 'ClickApply' }) {
|
||||||
const { applyStr, chatApplyBoxId } = opts
|
const { applyStr } = opts
|
||||||
|
|
||||||
const uri_ = this._getActiveEditorURI()
|
const uri_ = this._getActiveEditorURI()
|
||||||
if (!uri_) return
|
if (!uri_) return
|
||||||
|
|
@ -1495,7 +1488,6 @@ class EditCodeService extends Disposable implements IEditCodeService {
|
||||||
|
|
||||||
const adding: Omit<DiffZone, 'diffareaid'> = {
|
const adding: Omit<DiffZone, 'diffareaid'> = {
|
||||||
type: 'DiffZone',
|
type: 'DiffZone',
|
||||||
chatApplyBoxId,
|
|
||||||
originalCode: originalFileCode,
|
originalCode: originalFileCode,
|
||||||
startLine,
|
startLine,
|
||||||
endLine,
|
endLine,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue