feat: desk ia

This commit is contained in:
OpenSquared
2026-06-29 15:45:21 +02:00
parent 9c30b58f22
commit 69418ab650
7 changed files with 1238 additions and 3 deletions

View File

@@ -90,7 +90,7 @@ function KeepAlivePage({ path, component: Component }: { path: string; component
if (!kept.has(path) && !isActive) return null
return (
<div className={isActive ? 'flex-1 min-h-0 overflow-hidden' : 'hidden'}>
<div className={isActive ? 'flex-1 min-h-0 overflow-y-auto' : 'hidden'}>
<Component />
</div>
)

View File

@@ -1,5 +1,5 @@
import clsx from 'clsx'
import { X } from 'lucide-react'
import { X, ExternalLink } from 'lucide-react'
import { useLocation, useNavigate } from 'react-router-dom'
import { useTabs } from '../../context/TabsContext'
import { KEEP_ALIVE_META } from '../../config/keepAliveMeta'
@@ -33,6 +33,19 @@ export default function TabBar() {
<span
role="button"
tabIndex={-1}
title="Ouvrir dans une nouvelle fenêtre"
onClick={e => {
e.stopPropagation()
window.open(path, '_blank')
}}
className="ml-1 opacity-0 group-hover:opacity-100 text-slate-600 hover:text-slate-300 rounded hover:bg-slate-600/40 p-0.5 transition-opacity leading-none"
>
<ExternalLink size={9} />
</span>
<span
role="button"
tabIndex={-1}
title="Fermer"
onClick={e => {
e.stopPropagation()
const remaining = visible.filter(m => m.path !== path)
@@ -41,7 +54,7 @@ export default function TabBar() {
navigate(remaining[remaining.length - 1].path)
}
}}
className="ml-1 opacity-0 group-hover:opacity-100 text-slate-600 hover:text-white rounded hover:bg-slate-600/40 p-0.5 transition-opacity leading-none"
className="opacity-0 group-hover:opacity-100 text-slate-600 hover:text-white rounded hover:bg-slate-600/40 p-0.5 transition-opacity leading-none"
>
<X size={9} />
</span>

View File

@@ -488,6 +488,22 @@ function EcoConfig({
<p className="text-xs text-slate-600">Si désactivé, les surprises sont détectées mais pas enregistrées</p>
</div>
</div>
{/* auto_template toggle — only meaningful when create_market_event is on */}
<div className={`flex items-center gap-3 ${!(config.create_market_event ?? true) ? 'opacity-40 pointer-events-none' : ''}`}>
<button
onClick={() => set('auto_template', !(config.auto_template ?? false))}
className="shrink-0"
>
{(config.auto_template ?? false)
? <ToggleRight className="w-5 h-5 text-violet-400" />
: <ToggleLeft className="w-5 h-5 text-slate-600" />}
</button>
<div>
<span className="text-sm text-slate-300">Associer template causal automatiquement</span>
<p className="text-xs text-slate-600">L'IA sélectionne le template le plus proche ( 60% de confiance) ou en génère un nouveau via GPT-4o</p>
</div>
</div>
</div>
)
}