Merge branch 'master' into feat/design_agent_simple
Project CI / Repository checks (pull_request) Successful in 2m16s
Project CI / Frontend tests (pull_request) Successful in 3m0s
Project CI / Backend tests (pull_request) Successful in 7m26s
Project CI / Native shell tests (pull_request) Successful in 21m24s

This commit is contained in:
2026-09-05 19:49:29 +08:00
3 changed files with 16 additions and 64 deletions
@@ -1754,8 +1754,6 @@ for (const snippet of [
"'write_game_creator_app_config'",
'aria-label="运行时配置"',
'LLM API Key',
'External Editor Base URL',
'External Editor API Key',
'runtime_config.save',
"'/run:运行自检,启动本地 HTTP 预览并载入客户端运行视图'",
"'activate_local_game_preview'",
@@ -1791,6 +1789,19 @@ for (const snippet of [
}
}
for (const snippet of [
"label: '连接与工具'",
"id: 'connections'",
"activeSection === 'connections'",
'aria-label="外部连接"',
]) {
if (appSource.includes(snippet)) {
throw new Error(
`AI game creator shell removed settings page was reintroduced: ${snippet}`,
);
}
}
for (const script of [
'ai-game-creator-shell:dev',
'ai-game-creator-shell:dev-server',
@@ -1,6 +1,5 @@
import {
Bot,
Cable,
CheckCircle2,
CircleAlert,
Info,
@@ -91,7 +90,6 @@ const defaultRuntimeConfigDraft: GameCreatorAppConfig = {
type RuntimeSettingsSection =
| 'general'
| 'agents'
| 'connections'
| 'extensions'
| 'advanced'
| 'about';
@@ -116,12 +114,6 @@ const runtimeSettingsSections = [
description: '按角色覆盖默认模型',
icon: Bot,
},
{
id: 'connections',
label: '连接与工具',
description: '外部服务',
icon: Cable,
},
{
id: 'extensions',
label: '扩展',
@@ -1452,57 +1444,6 @@ export function RuntimeConfigDialog({
})}
</div>
) : null}
{activeSection === 'connections' ? (
<section
className="runtime-settings-section"
aria-label="外部连接"
>
<header className="runtime-settings-section-header">
<div>
<h3></h3>
<p>使</p>
</div>
</header>
{allowAdvancedExternalEditorConfig ? (
<div className="runtime-settings-fields">
<label>
External Editor Base URL
<input
aria-label="External Editor Base URL"
value={runtimeConfigDraft.editorApi.baseUrl}
onChange={(event) =>
setRuntimeConfigDraft((current) => ({
...current,
editorApi: {
...current.editorApi,
baseUrl: event.currentTarget.value,
},
}))
}
/>
</label>
<label>
External Editor API Key
<input
aria-label="External Editor API Key"
autoComplete="off"
type="password"
value={runtimeConfigDraft.editorApi.apiKey}
onChange={(event) =>
setRuntimeConfigDraft((current) => ({
...current,
editorApi: {
...current.editorApi,
apiKey: event.currentTarget.value,
},
}))
}
/>
</label>
</div>
) : null}
</section>
) : null}
{activeSection === 'extensions' ? (
<section
className="runtime-settings-section runtime-settings-extensions"
@@ -832,7 +832,7 @@ export function registerPublishedRuntimeSettingsTests() {
expect(
screen.getByLabelText('LLM API Key').getAttribute('autocomplete'),
).toBe('off');
fireEvent.click(screen.getByRole('button', { name: /连接与工具/ }));
expect(screen.queryByRole('button', { name: /连接与工具/ })).toBeNull();
expect(screen.queryByLabelText('External Editor Base URL')).toBeNull();
expect(screen.queryByLabelText('External Editor API Key')).toBeNull();
fireEvent.click(screen.getByRole('button', { name: /Agent 模型/ }));
@@ -1007,7 +1007,7 @@ export function registerPublishedRuntimeSettingsTests() {
target: { value: 'ark' },
},
);
fireEvent.click(screen.getByRole('button', { name: /连接与工具/ }));
expect(screen.queryByRole('button', { name: /连接与工具/ })).toBeNull();
expect(screen.queryByLabelText('External Editor Base URL')).toBeNull();
expect(screen.queryByLabelText('External Editor API Key')).toBeNull();
fireEvent.click(
@@ -1166,7 +1166,7 @@ export function registerPublishedRuntimeSettingsTests() {
'value',
'12000',
);
fireEvent.click(screen.getByRole('button', { name: /连接与工具/ }));
expect(screen.queryByRole('button', { name: /连接与工具/ })).toBeNull();
expect(screen.queryByLabelText('External Editor Base URL')).toBeNull();
expect(screen.queryByLabelText('External Editor API Key')).toBeNull();
fireEvent.click(