feat(web): passage en custom CLI sur version téléphone avec UI mobile adaptée — #224

This commit is contained in:
2026-08-17 17:56:47 +02:00
parent 9de51c7f43
commit c547b71d0c
6 changed files with 289 additions and 58 deletions

View File

@ -36,6 +36,7 @@ import {
import { PluginLayoutCellView } from "@/features/plugins";
import {
CustomAgentChatView,
isCustomAgentCliAvailable,
modelServerOverlayText,
describeModelServerDownload,
useModelServerLaunchState,
@ -640,24 +641,13 @@ function LeafView({
? profiles.find((p) => p.id === pinnedAgent.profileId)
: undefined;
const customCliAvailable = Boolean(
agentId &&
pinnedProfile?.structuredAdapter &&
agentGateway?.launchAgentChat &&
agentGateway?.reattachAgentChat &&
agentGateway?.sendAgentChat &&
agentGateway?.cancelAgentChat &&
agentGateway?.closeAgentChat,
agentId && isCustomAgentCliAvailable(pinnedProfile, agentGateway),
);
const trustedCustomCliAvailable = Boolean(
cellMode === "custom" &&
agentId &&
trustedCustomCli?.agent.id === agentId &&
trustedCustomCli.profile.structuredAdapter &&
agentGateway?.launchAgentChat &&
agentGateway?.reattachAgentChat &&
agentGateway?.sendAgentChat &&
agentGateway?.cancelAgentChat &&
agentGateway?.closeAgentChat,
isCustomAgentCliAvailable(trustedCustomCli.profile, agentGateway),
);
const effectiveCustomCliAvailable =
customCliAvailable || trustedCustomCliAvailable;