fix: remove "Let AI Decide" option from KB Accelerator upload

The uploader should know their content type — auto-detection adds
complexity and currently just defaults to troubleshooting anyway.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-11 22:56:40 -04:00
parent 963c0da10a
commit fe3c651115
3 changed files with 10 additions and 15 deletions

View File

@@ -10,7 +10,7 @@ import { getTreeEditorPath } from '@/lib/routing'
import type { KBImport, KBQuotaResponse, KBCommitResponse, KBNodeEditRequest } from '@/types/kbAccelerator'
type Phase = 'upload' | 'processing' | 'review' | 'success'
type TargetType = 'troubleshooting' | 'procedural' | 'auto'
type TargetType = 'troubleshooting' | 'procedural'
export default function KBAcceleratorPage() {
const navigate = useNavigate()
@@ -61,7 +61,7 @@ export default function KBAcceleratorPage() {
const resp = await kbAcceleratorApi.uploadText({
content,
title: title || undefined,
target_type: targetType === 'auto' ? undefined : targetType,
target_type: targetType,
})
setImportId(resp.id)
setPhase('processing')
@@ -77,7 +77,7 @@ export default function KBAcceleratorPage() {
const handleSubmitFile = async (file: File, targetType: TargetType) => {
setLoading(true)
try {
const resp = await kbAcceleratorApi.uploadFile(file, targetType === 'auto' ? undefined : targetType)
const resp = await kbAcceleratorApi.uploadFile(file, targetType)
setImportId(resp.id)
setPhase('processing')
startPolling(resp.id)