智能体交流风格
@@ -802,6 +824,28 @@
>
+
简略消息显示 {
const currentBlockDisplayMode = computed(() => experiments.value.blockDisplayMode);
const stackedHideBorders = computed(() => form.value.stacked_hide_borders);
+const minimalExpandHeightLimited = computed(() => form.value.minimal_expand_height_limited);
const blockDisplayLabel = computed(() => {
return (
@@ -2700,6 +2745,14 @@ const handleStackedHideBordersChange = (event: Event) => {
});
};
+const handleMinimalExpandHeightLimitedChange = (event: Event) => {
+ const target = event.target as HTMLInputElement;
+ personalization.updateField({
+ key: 'minimal_expand_height_limited',
+ value: target.checked
+ });
+};
+
const compactMessageDisplayOptions = [
{
id: 'full',
diff --git a/static/src/stores/personalization.ts b/static/src/stores/personalization.ts
index 192b276..effe976 100644
--- a/static/src/stores/personalization.ts
+++ b/static/src/stores/personalization.ts
@@ -31,6 +31,7 @@ interface PersonalForm {
show_git_status_bar: boolean;
auto_open_terminal_panel: boolean;
stacked_hide_borders: boolean;
+ minimal_expand_height_limited: boolean;
enhanced_tool_display_categories: string[];
enabled_skills: string[];
self_identify: string;
@@ -104,6 +105,7 @@ const RUN_MODE_OPTIONS: RunMode[] = ['fast', 'thinking', 'deep'];
const EXPERIMENT_STORAGE_KEY = 'agents_personalization_experiments';
const THEME_STORAGE_KEY = 'agents_ui_theme';
const STACKED_HIDE_BORDERS_STORAGE_KEY = 'agents_stacked_hide_borders';
+const MINIMAL_EXPAND_HEIGHT_LIMITED_STORAGE_KEY = 'agents_minimal_expand_height_limited';
const loadCachedTheme = (): PersonalForm['theme'] => {
if (typeof window === 'undefined' || !window.localStorage) {
@@ -153,6 +155,25 @@ const persistStackedHideBorders = (value: boolean) => {
}
};
+const loadCachedMinimalExpandHeightLimited = (): boolean => {
+ if (typeof window === 'undefined' || !window.localStorage) {
+ return true;
+ }
+ const saved = window.localStorage.getItem(MINIMAL_EXPAND_HEIGHT_LIMITED_STORAGE_KEY);
+ return saved === null ? true : saved === 'true';
+};
+
+const persistMinimalExpandHeightLimited = (value: boolean) => {
+ if (typeof window === 'undefined' || !window.localStorage) {
+ return;
+ }
+ try {
+ window.localStorage.setItem(MINIMAL_EXPAND_HEIGHT_LIMITED_STORAGE_KEY, value ? 'true' : 'false');
+ } catch (error) {
+ console.warn('写入极简展开高度限制设置失败:', error);
+ }
+};
+
const defaultForm = (): PersonalForm => ({
enabled: false,
communication_style: 'default',
@@ -174,6 +195,7 @@ const defaultForm = (): PersonalForm => ({
show_git_status_bar: true,
auto_open_terminal_panel: true,
stacked_hide_borders: loadCachedStackedHideBorders(),
+ minimal_expand_height_limited: loadCachedMinimalExpandHeightLimited(),
enhanced_tool_display_categories: [],
enabled_skills: [],
self_identify: '',
@@ -372,6 +394,7 @@ export const usePersonalizationStore = defineStore('personalization', {
show_git_status_bar: data.show_git_status_bar !== false,
auto_open_terminal_panel: data.auto_open_terminal_panel !== false,
stacked_hide_borders: !!data.stacked_hide_borders,
+ minimal_expand_height_limited: data.minimal_expand_height_limited !== false,
enhanced_tool_display_categories: Array.isArray(data.enhanced_tool_display_categories)
? data.enhanced_tool_display_categories.filter(
(item: unknown) => typeof item === 'string'
@@ -469,6 +492,7 @@ export const usePersonalizationStore = defineStore('personalization', {
}
persistDefaultHideWorkspace(this.form.default_hide_workspace);
persistStackedHideBorders(this.form.stacked_hide_borders);
+ persistMinimalExpandHeightLimited(this.form.minimal_expand_height_limited);
if (this.form.default_hide_workspace) {
useUiStore().setWorkspaceCollapsed(true);
}
@@ -673,6 +697,9 @@ export const usePersonalizationStore = defineStore('personalization', {
if (payload.key === 'stacked_hide_borders') {
persistStackedHideBorders(!!payload.value);
}
+ if (payload.key === 'minimal_expand_height_limited') {
+ persistMinimalExpandHeightLimited(!!payload.value);
+ }
this.clearFeedback();
this.scheduleAutoSave();
},