fixed type errors

This commit is contained in:
Arjun 2026-03-18 14:29:21 +05:30
parent 86818e7d21
commit bf13ff820d
11 changed files with 14 additions and 17 deletions

View file

@ -648,7 +648,7 @@ function App() {
voice.start() voice.start()
}, [voice]) }, [voice])
const handlePromptSubmitRef = useRef<((msg: { text: string }) => void) | null>(null) const handlePromptSubmitRef = useRef<((message: PromptInputMessage, mentions?: FileMention[], stagedAttachments?: StagedAttachment[], searchEnabled?: boolean) => Promise<void>) | null>(null)
const pendingVoiceInputRef = useRef(false) const pendingVoiceInputRef = useRef(false)
const handleSubmitRecording = useCallback(() => { const handleSubmitRecording = useCallback(() => {
@ -657,7 +657,7 @@ function App() {
isRecordingRef.current = false isRecordingRef.current = false
if (text) { if (text) {
pendingVoiceInputRef.current = true pendingVoiceInputRef.current = true
handlePromptSubmitRef.current?.({ text }) handlePromptSubmitRef.current?.({ text, files: [] })
} }
}, [voice]) }, [voice])

View file

@ -143,9 +143,6 @@ function getSortValue(note: NoteEntry, column: string): string | number {
return Array.isArray(v) ? v[0] ?? '' : v return Array.isArray(v) ? v[0] ?? '' : v
} }
const isBuiltin = (col: string): col is BuiltinColumn =>
(BUILTIN_COLUMNS as readonly string[]).includes(col)
export function BasesView({ tree, onSelectNote, config, onConfigChange, isDefaultBase, onSave, externalSearch, onExternalSearchConsumed }: BasesViewProps) { export function BasesView({ tree, onSelectNote, config, onConfigChange, isDefaultBase, onSave, externalSearch, onExternalSearchConsumed }: BasesViewProps) {
// Build notes instantly from tree // Build notes instantly from tree
const notes = useMemo<NoteEntry[]>(() => { const notes = useMemo<NoteEntry[]>(() => {

View file

@ -70,7 +70,7 @@ const providerDisplayNames: Record<string, string> = {
} }
interface ConfiguredModel { interface ConfiguredModel {
flavor: string flavor: "openai" | "anthropic" | "google" | "openrouter" | "aigateway" | "ollama" | "openai-compatible" | "rowboat"
model: string model: string
apiKey?: string apiKey?: string
baseURL?: string baseURL?: string
@ -224,7 +224,7 @@ function ChatInputInner({
for (const model of allModels) { for (const model of allModels) {
if (model) { if (model) {
models.push({ models.push({
flavor, flavor: flavor as ConfiguredModel['flavor'],
model, model,
apiKey: (e.apiKey as string) || undefined, apiKey: (e.apiKey as string) || undefined,
baseURL: (e.baseURL as string) || undefined, baseURL: (e.baseURL as string) || undefined,

View file

@ -57,7 +57,7 @@ export function ConnectorsPopover({ children, tooltip, open: openProp, onOpenCha
// Composio API key state // Composio API key state
const [composioApiKeyOpen, setComposioApiKeyOpen] = useState(false) const [composioApiKeyOpen, setComposioApiKeyOpen] = useState(false)
const [composioApiKeyTarget, setComposioApiKeyTarget] = useState<'slack' | 'gmail'>('gmail') const [, setComposioApiKeyTarget] = useState<'slack' | 'gmail'>('gmail')
// Slack state (agent-slack CLI) // Slack state (agent-slack CLI)
const [slackEnabled, setSlackEnabled] = useState(false) const [slackEnabled, setSlackEnabled] = useState(false)

View file

@ -59,7 +59,7 @@ export function FrontmatterProperties({ raw, onRawChange, editable = true }: Fro
}) })
}, []) }, [])
const commitField = useCallback((index: number) => { const commitField = useCallback((_index: number) => {
setFields(prev => { setFields(prev => {
commit(prev) commit(prev)
return prev return prev

View file

@ -555,7 +555,7 @@ export function MarkdownEditor({
return false return false
}, },
handleClickOn: (_view, _pos, node, nodePos, event) => { handleClickOn: (_view, _pos, node, _nodePos, event) => {
if (node.type.name === 'wikiLink') { if (node.type.name === 'wikiLink') {
event.preventDefault() event.preventDefault()
wikiLinks?.onOpen?.(node.attrs.path) wikiLinks?.onOpen?.(node.attrs.path)

View file

@ -84,7 +84,7 @@ export function OnboardingModal({ open, onComplete }: OnboardingModalProps) {
// Composio API key state // Composio API key state
const [composioApiKeyOpen, setComposioApiKeyOpen] = useState(false) const [composioApiKeyOpen, setComposioApiKeyOpen] = useState(false)
const [composioApiKeyTarget, setComposioApiKeyTarget] = useState<'slack' | 'gmail'>('gmail') const [, setComposioApiKeyTarget] = useState<'slack' | 'gmail'>('gmail')
// Slack state (agent-slack CLI) // Slack state (agent-slack CLI)
const [slackEnabled, setSlackEnabled] = useState(false) const [slackEnabled, setSlackEnabled] = useState(false)

View file

@ -41,7 +41,7 @@ const moreProviders: Array<{ id: LlmProviderFlavor; name: string; description: s
export function LlmSetupStep({ state }: LlmSetupStepProps) { export function LlmSetupStep({ state }: LlmSetupStepProps) {
const { const {
llmProvider, setLlmProvider, modelsCatalog, modelsLoading, modelsError, llmProvider, setLlmProvider, modelsCatalog, modelsLoading, modelsError,
activeConfig, testState, setTestState, showApiKey, requiresApiKey, activeConfig, testState, setTestState, showApiKey,
showBaseURL, isLocalProvider, canTest, showMoreProviders, setShowMoreProviders, showBaseURL, isLocalProvider, canTest, showMoreProviders, setShowMoreProviders,
updateProviderConfig, handleTestAndSaveLlmConfig, handleBack, updateProviderConfig, handleTestAndSaveLlmConfig, handleBack,
upsellDismissed, setUpsellDismissed, handleSwitchToRowboat, upsellDismissed, setUpsellDismissed, handleSwitchToRowboat,

View file

@ -907,7 +907,7 @@ const DEFAULT_TAGS: TagDef[] = [
function TagGroupTable({ function TagGroupTable({
group, group,
tags, tags: _tags,
collapsed, collapsed,
onToggle, onToggle,
onAdd, onAdd,

View file

@ -3,8 +3,8 @@ import { ReactNodeViewRenderer, NodeViewWrapper } from '@tiptap/react'
import { CalendarClock, X } from 'lucide-react' import { CalendarClock, X } from 'lucide-react'
import { inlineTask } from '@x/shared' import { inlineTask } from '@x/shared'
function TaskBlockView({ node, deleteNode }: { node: { attrs: { data: string } }; deleteNode: () => void }) { function TaskBlockView({ node, deleteNode }: { node: { attrs: Record<string, unknown> }; deleteNode: () => void }) {
const raw = node.attrs.data const raw = node.attrs.data as string
let instruction = '' let instruction = ''
let scheduleLabel = '' let scheduleLabel = ''

View file

@ -1,8 +1,8 @@
import { useState, useEffect, useCallback } from 'react' import { useState, useEffect, useCallback } from 'react'
interface BillingInfo { interface BillingInfo {
subscriptionPlan: string subscriptionPlan: string | null
subscriptionStatus: string subscriptionStatus: string | null
sanctionedCredits: number sanctionedCredits: number
availableCredits: number availableCredits: number
} }