chore: remove unused modules and ignore local env and coverage output
src/api/piContract.ts and src/hooks/usePanelResizeStatus.ts have no importers (knip and grep).
This commit is contained in:
1 parent
2d2cdf3b19
commit
adf63ef9f7
3 files changed
+5
-72
No files matched your search
@@ -7,3 +7,8 @@ tmp/
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
.pi-lens/
|
||||
|
||||
# Local env and test output
|
||||
.env
|
||||
.env.local
|
||||
coverage/
|
||||
@@ -1,51 +0,0 @@
|
||||
import type { Session, Model } from '../types/api/compat'
|
||||
|
||||
export interface SessionListResponse {
|
||||
sessions: Session[]
|
||||
}
|
||||
|
||||
export interface SessionCreateRequest {
|
||||
title?: string
|
||||
directory?: string
|
||||
}
|
||||
|
||||
export interface SessionUpdateRequest {
|
||||
title?: string
|
||||
}
|
||||
|
||||
export interface SessionForkRequest {
|
||||
messageID?: string
|
||||
directory?: string
|
||||
}
|
||||
|
||||
export interface SendMessageRequest {
|
||||
sessionId: string
|
||||
text: string
|
||||
model?: { providerID: string; modelID: string }
|
||||
directory?: string
|
||||
}
|
||||
|
||||
export interface SendMessageResponse {
|
||||
messageID: string
|
||||
sessionID: string
|
||||
}
|
||||
|
||||
export interface ModelsResponse {
|
||||
models: Model[]
|
||||
}
|
||||
|
||||
export interface PartDeltaPayload {
|
||||
sessionID: string
|
||||
messageID: string
|
||||
partID: string
|
||||
field: 'text' | 'reasoning' | 'tool'
|
||||
delta: string
|
||||
}
|
||||
|
||||
export interface PiGlobalEvent {
|
||||
directory?: string
|
||||
payload: {
|
||||
type: string
|
||||
properties: unknown
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { flushSync } from 'react-dom'
|
||||
|
||||
export function usePanelResizeStatus(): boolean {
|
||||
const [isResizing, setIsResizing] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
const onStart = () => flushSync(() => setIsResizing(true))
|
||||
const onEnd = () => setIsResizing(false)
|
||||
|
||||
window.addEventListener('panel-resize-start', onStart)
|
||||
window.addEventListener('panel-resize-end', onEnd)
|
||||
|
||||
return () => {
|
||||
window.removeEventListener('panel-resize-start', onStart)
|
||||
window.removeEventListener('panel-resize-end', onEnd)
|
||||
}
|
||||
}, [])
|
||||
|
||||
return isResizing
|
||||
}
|
||||
Reference in new issue
Block a user