mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-22 16:25:51 +00:00
feat: 全部类型问题解决
This commit is contained in:
@@ -2148,7 +2148,7 @@ async function handleScreenshot(
|
||||
|
||||
const monitorNote = await buildMonitorNote(
|
||||
adapter,
|
||||
shot.displayId,
|
||||
shot.displayId ?? 0,
|
||||
overrides.lastScreenshot?.displayId,
|
||||
overrides.onDisplayPinned !== undefined,
|
||||
);
|
||||
@@ -2217,7 +2217,7 @@ async function handleScreenshot(
|
||||
|
||||
const monitorNote = await buildMonitorNote(
|
||||
adapter,
|
||||
shot.displayId,
|
||||
shot.displayId ?? 0,
|
||||
overrides.lastScreenshot?.displayId,
|
||||
overrides.onDisplayPinned !== undefined,
|
||||
);
|
||||
|
||||
@@ -16,6 +16,12 @@
|
||||
*/
|
||||
import bidiFactory from 'bidi-js'
|
||||
|
||||
type BidiInstance = {
|
||||
getEmbeddingLevels: (text: string, defaultDirection?: string) => { paragraphLevel: number; levels: Uint8Array }
|
||||
getReorderSegments: (text: string, embeddingLevels: { paragraphLevel: number; levels: Uint8Array }, start?: number, end?: number) => [number, number][]
|
||||
getVisualOrder: (reorderSegments: [number, number][]) => number[]
|
||||
}
|
||||
|
||||
type ClusteredChar = {
|
||||
value: string
|
||||
width: number
|
||||
@@ -23,7 +29,7 @@ type ClusteredChar = {
|
||||
hyperlink: string | undefined
|
||||
}
|
||||
|
||||
let bidiInstance: ReturnType<typeof bidiFactory> | undefined
|
||||
let bidiInstance: BidiInstance | undefined
|
||||
let needsSoftwareBidi: boolean | undefined
|
||||
|
||||
function needsBidi(): boolean {
|
||||
@@ -38,7 +44,7 @@ function needsBidi(): boolean {
|
||||
|
||||
function getBidi() {
|
||||
if (!bidiInstance) {
|
||||
bidiInstance = bidiFactory()
|
||||
bidiInstance = (bidiFactory as unknown as () => BidiInstance)()
|
||||
}
|
||||
return bidiInstance
|
||||
}
|
||||
|
||||
@@ -1883,8 +1883,8 @@ export default class Ink {
|
||||
let reentered = false
|
||||
const intercept = (
|
||||
chunk: Uint8Array | string,
|
||||
encodingOrCb?: BufferEncoding | ((err?: Error) => void),
|
||||
cb?: (err?: Error) => void,
|
||||
encodingOrCb?: BufferEncoding | ((err?: Error | null) => void),
|
||||
cb?: (err?: Error | null) => void,
|
||||
): boolean => {
|
||||
const callback = typeof encodingOrCb === 'function' ? encodingOrCb : cb
|
||||
// Reentrancy guard: logger.debug → writeToStderr → here. Pass
|
||||
|
||||
Reference in New Issue
Block a user