remove few components on frontend

This commit is contained in:
Xin Wang 2025-12-17 11:03:36 +08:00
parent b75fd71bc7
commit 2decf208b4
2 changed files with 43 additions and 43 deletions

View File

@ -103,7 +103,7 @@ DEFAULT_INSTRUCTIONS = """# 角色
- 一次询问一个问题 - 一次询问一个问题
- 不要在你的回复中使用 emojis, asterisks, markdown, 或其他特殊字符 - 不要在你的回复中使用 emojis, asterisks, markdown, 或其他特殊字符
- 不同阶段直接的过渡语句自然 - 不同阶段直接的过渡语句自然
- 你已经说过下面的开场白所以不需要重复说您好这里是无锡交警我将为您远程处理交通事故请将人员撤离至路侧安全区域开启危险报警双闪灯放置三角警告牌做好安全防护谨防二次事故伤害若您已经准备好了请点击继续办理如需人工服务请说转人工 - 你已经说过下面的开场白用户点击继续办理说明已经认可所以不需要重复说您好这里是无锡交警我将为您远程处理交通事故请将人员撤离至路侧安全区域开启危险报警双闪灯放置三角警告牌做好安全防护谨防二次事故伤害若您已经准备好了请点击继续办理如需人工服务请说转人工
""" """
DEFAULT_TALKING_MODE = 'push_to_talk' DEFAULT_TALKING_MODE = 'push_to_talk'
@ -1030,6 +1030,7 @@ async def entrypoint(ctx: JobContext, avatar_dispatcher_url: str = None, vision_
logger.info("Using default DeepSeek backend") logger.info("Using default DeepSeek backend")
llm = openai.LLM.with_deepseek( llm = openai.LLM.with_deepseek(
model='deepseek-chat', model='deepseek-chat',
temperature=0.1
) )
session = AgentSession( session = AgentSession(

View File

@ -479,6 +479,7 @@ export default function Playground({
]); ]);
const instructionsContent = ( const instructionsContent = (
<>
<ConfigurationPanelItem title="Instructions"> <ConfigurationPanelItem title="Instructions">
<textarea <textarea
className="w-full bg-gray-950 text-white text-sm p-3 rounded-md border border-gray-800 focus:border-gray-600 focus:outline-none transition-colors resize-none disabled:opacity-50 disabled:cursor-not-allowed" className="w-full bg-gray-950 text-white text-sm p-3 rounded-md border border-gray-800 focus:border-gray-600 focus:outline-none transition-colors resize-none disabled:opacity-50 disabled:cursor-not-allowed"
@ -494,6 +495,18 @@ export default function Playground({
disabled={roomState !== ConnectionState.Disconnected} disabled={roomState !== ConnectionState.Disconnected}
/> />
</ConfigurationPanelItem> </ConfigurationPanelItem>
<ConfigurationPanelItem title="Color">
<ColorPicker
colors={themeColors}
selectedColor={config.settings.theme_color}
onSelect={(color) => {
const userSettings = { ...config.settings };
userSettings.theme_color = color;
setUserSettings(userSettings);
}}
/>
</ConfigurationPanelItem>
</>
); );
const handleRpcCall = useCallback(async () => { const handleRpcCall = useCallback(async () => {
@ -516,13 +529,13 @@ export default function Playground({
const settingsTileContent = useMemo(() => { const settingsTileContent = useMemo(() => {
return ( return (
<div className="flex flex-col h-full w-full items-start overflow-y-auto"> <div className="flex flex-col h-full w-full items-start overflow-y-auto">
{config.description && ( {/* {config.description && (
<ConfigurationPanelItem title="Description"> <ConfigurationPanelItem title="Description">
{config.description} {config.description}
</ConfigurationPanelItem> </ConfigurationPanelItem>
)} )} */}
<ConfigurationPanelItem title="Room"> {/* <ConfigurationPanelItem title="Room">
<div className="flex flex-col gap-2"> <div className="flex flex-col gap-2">
<EditableNameValueRow <EditableNameValueRow
name="Room name" name="Room name"
@ -556,9 +569,9 @@ export default function Playground({
} }
/> />
</div> </div>
</ConfigurationPanelItem> </ConfigurationPanelItem> */}
<ConfigurationPanelItem title="Agent"> {/* <ConfigurationPanelItem title="Agent">
<div className="flex flex-col gap-2"> <div className="flex flex-col gap-2">
<EditableNameValueRow <EditableNameValueRow
name="Agent name" name="Agent name"
@ -621,9 +634,9 @@ export default function Playground({
. .
</p> </p>
</div> </div>
</ConfigurationPanelItem> </ConfigurationPanelItem> */}
<ConfigurationPanelItem title="User"> {/* <ConfigurationPanelItem title="User">
<div className="flex flex-col gap-2"> <div className="flex flex-col gap-2">
<EditableNameValueRow <EditableNameValueRow
name="Name" name="Name"
@ -675,7 +688,7 @@ export default function Playground({
connectionState={roomState} connectionState={roomState}
/> />
</div> </div>
</ConfigurationPanelItem> </ConfigurationPanelItem> */}
{roomState === ConnectionState.Connected && {roomState === ConnectionState.Connected &&
config.settings.inputs.screen && ( config.settings.inputs.screen && (
@ -725,19 +738,6 @@ export default function Playground({
<AudioInputTile trackRef={localMicTrack} /> <AudioInputTile trackRef={localMicTrack} />
</ConfigurationPanelItem> </ConfigurationPanelItem>
)} )}
<div className="w-full">
<ConfigurationPanelItem title="Color">
<ColorPicker
colors={themeColors}
selectedColor={config.settings.theme_color}
onSelect={(color) => {
const userSettings = { ...config.settings };
userSettings.theme_color = color;
setUserSettings(userSettings);
}}
/>
</ConfigurationPanelItem>
</div>
{config.show_qr && ( {config.show_qr && (
<div className="w-full"> <div className="w-full">
<ConfigurationPanelItem title="QR Code"> <ConfigurationPanelItem title="QR Code">
@ -748,7 +748,6 @@ export default function Playground({
</div> </div>
); );
}, [ }, [
config.description,
config.settings, config.settings,
config.show_qr, config.show_qr,
localParticipant, localParticipant,
@ -842,7 +841,7 @@ export default function Playground({
return ( return (
<> <>
<PlaygroundHeader {/* <PlaygroundHeader
title={config.title} title={config.title}
logo={logo} logo={logo}
githubLink={config.github_link} githubLink={config.github_link}
@ -856,10 +855,10 @@ export default function Playground({
handleDisconnect(); handleDisconnect();
} }
}} }}
/> /> */}
<div <div
className={`flex gap-4 py-4 grow w-full selection:bg-${config.settings.theme_color}-900`} className={`flex gap-4 py-4 grow w-full selection:bg-${config.settings.theme_color}-900`}
style={{ height: `calc(100% - ${headerHeight}px)` }} style={{ height: `100%` }}
> >
<div className="flex flex-col grow basis-1/2 gap-4 h-full lg:hidden"> <div className="flex flex-col grow basis-1/2 gap-4 h-full lg:hidden">
<PlaygroundTabbedTile <PlaygroundTabbedTile
@ -926,14 +925,14 @@ export default function Playground({
</PlaygroundTile> </PlaygroundTile>
</div> </div>
)} )}
<PlaygroundTile {/* <PlaygroundTile
padding={false} padding={false}
backgroundColor="gray-950" backgroundColor="gray-950"
className="h-full w-full basis-1/4 items-start overflow-y-auto hidden max-w-[480px] lg:flex" className="h-full w-full basis-1/4 items-start overflow-y-auto hidden max-w-[480px] lg:flex"
childrenClassName="h-full grow items-start" childrenClassName="h-full grow items-start"
> >
{settingsTileContent} {settingsTileContent}
</PlaygroundTile> </PlaygroundTile> */}
</div> </div>
</> </>
); );