mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-18 14:13:06 +00:00
Modo "Por tema" no acervo de falas: expansão determinística do tema via DeepSeek (generateObject, timeout, fallback null) alimenta o motor lexical existente (searchText/keywords OR), mantendo facetas AND, paginação por fala, o OR de cortes do C174 e o access control intacto. Resultado de tema mostra selo e "Por que apareceu" com trecho real (frase contínua), sem score; degradação honesta para termo exato com aviso e vazio honesto com saídas. - URL: mode=tema (default omitido; canonicaliza sem q), seletor otimista - ai/expandSpeechSearchTheme + lib/speechThemeTerms (sanitiza saída do modelo) - view model com themeMatchTerm + espelho speechMatchesSearchTerm - UI do card de tema (selos, proveniência, ações) e aviso degradado - sem migration/Consent/exposição pública; gate de leitura inalterado - testes unit/int/e2e; design hi-fi estendido e certificado pelo designer
25 lines
948 B
TypeScript
25 lines
948 B
TypeScript
import { TriangleAlertIcon } from 'lucide-react'
|
|
|
|
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/Alert'
|
|
|
|
/**
|
|
* C192 — the discreet fallback notice when `mode=tema` was asked but the theme
|
|
* expansion was unavailable. The list below shows the literal results; the
|
|
* notice keeps the user's request honest instead of hiding the downgrade.
|
|
*/
|
|
export const SpeechThemeFallbackNotice = () => (
|
|
<Alert
|
|
variant="pending"
|
|
data-testid="speech-theme-fallback"
|
|
className="gap-3 border-estimate-pending/80 bg-estimate-pending/55 px-4 py-3"
|
|
>
|
|
<TriangleAlertIcon aria-hidden="true" />
|
|
<AlertTitle className="text-sm font-medium">
|
|
A busca por tema está indisponível agora.
|
|
</AlertTitle>
|
|
<AlertDescription className="text-xs leading-5">
|
|
Você pediu “Por tema”. Para não interromper o trabalho, mostramos abaixo os resultados por
|
|
termo exato.
|
|
</AlertDescription>
|
|
</Alert>
|
|
)
|