You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by wy...@apache.org on 2026/10/22 11:39:26 UTC

(maka) 04/17: Edit global AGENTS.md from terminal general settings

This is an automated email from the ASF dual-hosted git repository.

M4n5ter pushed a commit to branch rust-preview
in repository https://gitbox.apache.org/repos/asf/maka.git

commit 6227818befc45576db1c90d7685e801ca0bb8423
Author: M4n5ter <m4...@gmail.com>
AuthorDate: Thu Oct 22 18:15:42 2026 +0800

    Edit global AGENTS.md from terminal general settings
---
 .../maka/terminal-shell/app/GeneralSettings.tsx    | 153 ++++++++++++--
 .../maka/terminal-shell/app/generalSettings.ts     | 219 +++++++++++++++++----
 .../maka/terminal-shell/app/locale-settings.ts     |  59 ++++--
 3 files changed, 368 insertions(+), 63 deletions(-)

diff --git a/products/maka/terminal-shell/app/GeneralSettings.tsx b/products/maka/terminal-shell/app/GeneralSettings.tsx
index 9a14933ce1..916a7bc2e9 100644
--- a/products/maka/terminal-shell/app/GeneralSettings.tsx
+++ b/products/maka/terminal-shell/app/GeneralSettings.tsx
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-import { inputAction, Scroll, Text, View } from 'nsh';
+import { Input, inputAction, Scroll, Text, View } from 'nsh';
 import { tr } from './locale';
 import { Button } from 'nsh/base';
 import {
@@ -32,6 +32,9 @@ import {
   bodyTextStyle,
   captionTextStyle,
   C,
+  compact,
+  inputBorderRadius,
+  inputTextStyle,
   controlStyle,
   controlHoverStyle,
   controlFocusStyle,
@@ -44,12 +47,18 @@ export function GeneralSettings(props: { owner: GeneralSettingsOwner }) {
     <Scroll style={{ flex: 1, minHeight: 0 }}>
       <View style={{ padding: 8, gap: 16 }}>
         <If when={owner.loading()}>
-          <Text style={{ ...bodyTextStyle, color: C.muted }}>{tr('Reading preferences…')}</Text>
+          <Text style={{ ...bodyTextStyle, color: C.muted }}>
+            {owner.editor()?.kind === 'globalInstructions'
+              ? tr('Reading global instructions…')
+              : tr('Reading preferences…')}
+          </Text>
         </If>
         <Each of={[owner.action()]} key={(request) => JSON.stringify(request)}>
           {(action) => {
             const request = action();
             if (request.kind === 'root') return <GeneralRoot owner={owner} request={request} />;
+            if (request.kind === 'globalInstructions')
+              return <GlobalInstructionsEditor owner={owner} request={request} />;
             return <PreferenceEditor owner={owner} request={request} />;
           }}
         </Each>
@@ -169,7 +178,7 @@ function GeneralRoot(props: { owner: GeneralSettingsOwner; request: GeneralActio
           <View pointerEvents="none" style={{ flex: 1, minWidth: 0, gap: 4 }}>
             <Text style={{ ...bodyTextStyle, color: C.text }}>{tr('Personalization')}</Text>
             <Text numberOfLines={1} style={{ ...captionTextStyle, color: C.muted }}>
-              {owner.facts()?.displayName || tr('Display name and assistant tone')}
+              {owner.facts()?.displayName || tr('Display name')}
             </Text>
           </View>
           <Icon name="right" color={C.muted} />
@@ -198,6 +207,34 @@ function GeneralRoot(props: { owner: GeneralSettingsOwner; request: GeneralActio
           <Icon name="right" color={C.muted} />
         </Button>
       </If>
+      <Button
+        disabled={owner.blocked()}
+        onPress={inputAction(owner.openGlobal, request)}
+        accessibilityLabel={tr('Edit global instructions')}
+        hoverStyle={controlHoverStyle}
+        focusStyle={controlFocusStyle}
+        style={{
+          ...controlStyle,
+          minHeight: 56,
+          flexDirection: 'row',
+          alignItems: 'center',
+          gap: 12,
+        }}
+        disabledStyle={controlDisabledStyle}
+      >
+        <View pointerEvents="none" style={{ flex: 1, minWidth: 0, gap: 4 }}>
+          <Text style={{ ...bodyTextStyle, color: C.text }}>{tr('Global instructions')}</Text>
+          <Text style={{ ...captionTextStyle, color: C.muted }}>
+            {tr('Edit the global AGENTS.md used by the assistant.')}
+          </Text>
+        </View>
+        <Icon name="right" color={C.muted} />
+      </Button>
+      <If when={owner.facts()?.workspaceInstructions === false}>
+        <Text style={{ ...captionTextStyle, color: C.muted }}>
+          {tr('Workspace instructions are off, so global instructions are not applied.')}
+        </Text>
+      </If>
     </View>
   );
 }
@@ -242,10 +279,6 @@ function PreferenceEditor(props: { owner: GeneralSettingsOwner; request: General
     const editor = owner.editor();
     return editor?.kind === 'personalization' ? editor.displayName : '';
   };
-  const tone = () => {
-    const editor = owner.editor();
-    return editor?.kind === 'personalization' ? editor.assistantTone : '';
-  };
   const prompt = () => {
     const editor = owner.editor();
     return editor?.kind === 'compaction' ? editor.prompt : '';
@@ -259,17 +292,9 @@ function PreferenceEditor(props: { owner: GeneralSettingsOwner; request: General
         <SettingsField
           label={tr('Display name')}
           value={name()}
-          change={(text) => owner.editName(request, 'displayName', text)}
+          change={(text) => owner.editName(request, text)}
           disabled={owner.disabled()}
         />
-        <SettingsField
-          label={tr('Assistant tone')}
-          value={tone()}
-          change={(text) => owner.editName(request, 'assistantTone', text)}
-          disabled={owner.disabled()}
-          multiline
-          hint={tr('How the assistant should respond.')}
-        />
       </If>
       <If when={request.kind === 'compaction'}>
         <SettingsField
@@ -320,3 +345,99 @@ function PreferenceEditor(props: { owner: GeneralSettingsOwner; request: General
     </View>
   );
 }
+
+function GlobalInstructionsEditor(props: { owner: GeneralSettingsOwner; request: GeneralAction }) {
+  const owner = props.owner;
+  const request = props.request;
+  const document = owner.globalDocument;
+  return (
+    <View style={{ gap: 16 }}>
+      <If when={document()}>
+        <Text selectable style={{ ...captionTextStyle, color: C.muted }}>
+          {document()?.basis.path}
+        </Text>
+        <If when={document()?.basis.exists === false}>
+          <Text style={{ ...captionTextStyle, color: C.muted }}>
+            {tr('This file does not exist. Saving will create it.')}
+          </Text>
+        </If>
+        <Input
+          accessibilityLabel={tr('Global instructions')}
+          value={document()?.content ?? ''}
+          onChange={(content) => owner.editGlobal(request, content)}
+          multiline
+          submitBehavior="newline"
+          readonly={owner.disabled()}
+          autoCapitalize="none"
+          autoCorrect={false}
+          style={{
+            ...inputTextStyle,
+            height: compact() ? 200 : 320,
+            borderWidth: 1,
+            borderColor: C.line,
+            borderRadius: inputBorderRadius,
+            backgroundColor: C.background,
+            color: C.text,
+            paddingHorizontal: 12,
+            paddingVertical: 8,
+          }}
+          focusStyle={{ borderColor: C.accent }}
+        />
+        <If when={document()?.conflict}>
+          <Text style={{ ...captionTextStyle, color: C.warning }}>
+            {tr('Source changed. Your draft is preserved. Reload the source before saving again.')}
+          </Text>
+        </If>
+      </If>
+      <If when={!document() && !owner.loading()}>
+        <Text style={{ ...bodyTextStyle, color: C.warning }}>
+          {tr('Source unavailable. Reload to try again.')}
+        </Text>
+      </If>
+      <If when={owner.facts()?.workspaceInstructions === false}>
+        <Text style={{ ...captionTextStyle, color: C.muted }}>
+          {tr('Workspace instructions are off, so global instructions are not applied.')}
+        </Text>
+      </If>
+      <View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 8 }}>
+        <Button
+          disabled={owner.saveDisabled()}
+          accessibilityLabel={tr('Save global instructions')}
+          onPress={inputAction(owner.save, request)}
+          focusStyle={{ backgroundColor: C.accentHover }}
+          style={{ ...controlStyle, backgroundColor: C.accent }}
+          hoverStyle={{ backgroundColor: C.accentHover }}
+          disabledStyle={controlDisabledStyle}
+        >
+          <Text style={{ ...bodyTextStyle, color: C.background, fontWeight: '500' }}>
+            {tr('Save global instructions')}
+          </Text>
+        </Button>
+        <Button
+          disabled={owner.blocked()}
+          accessibilityLabel={tr('Reload (discard edits)')}
+          onPress={inputAction(owner.reloadGlobal, request)}
+          focusStyle={controlFocusStyle}
+          style={controlStyle}
+          hoverStyle={controlHoverStyle}
+          disabledStyle={controlDisabledStyle}
+        >
+          <Text style={{ ...bodyTextStyle, color: C.secondary }}>
+            {tr('Reload (discard edits)')}
+          </Text>
+        </Button>
+        <Button
+          disabled={owner.busy()}
+          accessibilityLabel={tr('Cancel')}
+          onPress={inputAction(owner.cancel, request)}
+          focusStyle={controlFocusStyle}
+          style={controlStyle}
+          hoverStyle={controlHoverStyle}
+          disabledStyle={controlDisabledStyle}
+        >
+          <Text style={{ ...bodyTextStyle, color: C.secondary }}>{tr('Cancel')}</Text>
+        </Button>
+      </View>
+    </View>
+  );
+}
diff --git a/products/maka/terminal-shell/app/generalSettings.ts b/products/maka/terminal-shell/app/generalSettings.ts
index 3c4cb6c16e..85548e3a0b 100644
--- a/products/maka/terminal-shell/app/generalSettings.ts
+++ b/products/maka/terminal-shell/app/generalSettings.ts
@@ -22,6 +22,7 @@ import { host } from './host';
 import { applyLanguagePreference, tr } from './locale';
 import { message, UiError } from './text';
 import type {
+  AgentGlobalInstructionsView,
   LanguagePreference,
   SettingsAssistantPreferences,
   SettingsPreferencesMutation,
@@ -29,13 +30,12 @@ import type {
 } from '../../../../packages/plugin-sdk/src/index.js';
 import type { SettingsOperations } from './settingsOperations';
 
-type Editor =
+type PreferencesEditor =
   | {
       kind: 'personalization';
       id: number;
       basis: SettingsAssistantPreferences;
       displayName: string;
-      assistantTone: string;
     }
   | {
       kind: 'compaction';
@@ -44,11 +44,25 @@ type Editor =
       prompt: string;
       useDefault: boolean;
     };
-export type GeneralAction = {
+type GlobalInstructions = Extract<AgentGlobalInstructionsView, { kind: 'available' }>;
+type GlobalEditor = {
+  kind: 'globalInstructions';
+  id: number;
+  document: { basis: GlobalInstructions; content: string; conflict: boolean } | null;
+};
+type Editor = PreferencesEditor | GlobalEditor;
+type PreferencesAction = {
   view: number;
-  revision: number | null;
-  kind: 'root' | Editor['kind'];
+  policyRevision: number | null;
+  kind: 'root' | PreferencesEditor['kind'];
 };
+export type GeneralAction =
+  | PreferencesAction
+  | {
+      view: number;
+      kind: 'globalInstructions';
+      fileBasis: Pick<GlobalInstructions, 'source' | 'revision'> | null;
+    };
 export const assistantLanguages = (): { value: LanguagePreference; label: string }[] => [
   { value: 'auto', label: tr('Automatic') },
   { value: 'en', label: 'English' },
@@ -65,27 +79,46 @@ export function createGeneralSettings(operations: SettingsOperations, active: ()
   let enabled = false;
   let read = 0;
   const visible = () => alive && enabled && active();
-  const action = (): GeneralAction => ({
-    view: view(),
-    revision: editor()?.basis.revision ?? facts()?.revision ?? null,
-    kind: editor()?.kind ?? 'root',
-  });
+  const action = (): GeneralAction => {
+    const form = editor();
+    if (form?.kind === 'globalInstructions')
+      return {
+        view: view(),
+        kind: form.kind,
+        fileBasis: form.document
+          ? { source: form.document.basis.source, revision: form.document.basis.revision }
+          : null,
+      };
+    return {
+      view: view(),
+      policyRevision: form?.basis.revision ?? facts()?.revision ?? null,
+      kind: form?.kind ?? 'root',
+    };
+  };
   const current = (request: GeneralAction) => {
     const selected = action();
-    return (
-      visible() &&
-      request.view === selected.view &&
-      request.revision === selected.revision &&
-      request.kind === selected.kind
-    );
+    if (!visible() || request.view !== selected.view || request.kind !== selected.kind)
+      return false;
+    return request.kind === 'globalInstructions'
+      ? selected.kind === 'globalInstructions' &&
+          request.fileBasis?.source === selected.fileBasis?.source &&
+          request.fileBasis?.revision === selected.fileBasis?.revision
+      : selected.kind !== 'globalInstructions' &&
+          request.policyRevision === selected.policyRevision;
   };
-  const disabled = () =>
+  const blocked = () =>
     !visible() ||
     loading() ||
     operations.busy() ||
     !operations.pendingKnown() ||
-    operations.pending().length > 0 ||
-    facts() === null;
+    operations.pending().length > 0;
+  const globalDocument = () => {
+    const form = editor();
+    return form?.kind === 'globalInstructions' ? form.document : null;
+  };
+  const disabled = () =>
+    blocked() ||
+    (editor()?.kind === 'globalInstructions' ? globalDocument() === null : facts() === null);
   const cancelRead = () => {
     read += 1;
     view.set(view() + 1);
@@ -115,12 +148,12 @@ export function createGeneralSettings(operations: SettingsOperations, active: ()
     }
   };
   const mutate = (
-    request: GeneralAction,
+    request: PreferencesAction,
     mutation: SettingsPreferencesMutation,
-    submitted: Editor | null = null,
+    submitted: PreferencesEditor | null = null,
   ) => {
-    if (!current(request) || disabled() || request.revision === null) return;
-    const expectedRevision = request.revision;
+    if (!current(request) || disabled() || request.policyRevision === null) return;
+    const expectedRevision = request.policyRevision;
     return operations.run(async () => {
       if (!current(request)) return;
       const result: SettingsPreferencesUpdated = await operations.mutate(
@@ -153,7 +186,68 @@ export function createGeneralSettings(operations: SettingsOperations, active: ()
       }
     });
   };
-  const open = (request: GeneralAction, kind: Editor['kind']) => {
+  const loadGlobal = async (id: number) => {
+    const form = editor();
+    if (!visible() || form?.kind !== 'globalInstructions' || form.id !== id) return;
+    const generation = ++read;
+    const capturedView = view();
+    const owns = () =>
+      visible() &&
+      generation === read &&
+      capturedView === view() &&
+      editor()?.kind === 'globalInstructions' &&
+      editor()?.id === id;
+    loading.set(true);
+    try {
+      const result = await host.query('agent', 'globalInstructions', {});
+      if (!owns()) return;
+      if (result.kind !== 'available')
+        throw new UiError('Source unavailable. Reload to try again.');
+      editor.set({
+        kind: 'globalInstructions',
+        id,
+        document: { basis: result, content: result.content, conflict: false },
+      });
+    } catch (reason) {
+      if (owns()) operations.report(reason);
+    } finally {
+      if (owns()) loading.set(false);
+    }
+  };
+  const settleGlobal = async (value: unknown) => {
+    if (!alive) return;
+    const kind = value !== null && typeof value === 'object' && 'kind' in value ? value.kind : null;
+    const form = editor();
+    switch (kind) {
+      case 'saved':
+        if (form?.kind === 'globalInstructions') {
+          // The committed draft cannot be submitted again, even if this read fails.
+          batch(() => {
+            cancelRead();
+            editor.set({ kind: form.kind, id: form.id, document: null });
+          });
+          if (visible()) await loadGlobal(form.id);
+        }
+        if (alive) operations.notice.set(message('Global instructions saved.'));
+        return;
+      case 'changed':
+        if (form?.kind === 'globalInstructions' && form.document) {
+          const document = form.document;
+          batch(() => {
+            cancelRead();
+            editor.set({ ...form, document: { ...document, conflict: true } });
+          });
+        }
+        throw new UiError(
+          'Source changed. Your draft is preserved. Reload the source before saving again.',
+        );
+      case 'unavailable':
+        throw new UiError('Source unavailable. Reload to try again.');
+      default:
+        throw new UiError('The Host returned an invalid global instructions result.');
+    }
+  };
+  const open = (request: GeneralAction, kind: PreferencesEditor['kind']) => {
     const basis = facts();
     if (!basis || request.kind !== 'root' || !current(request) || disabled()) return;
     cancelRead();
@@ -164,7 +258,6 @@ export function createGeneralSettings(operations: SettingsOperations, active: ()
             id: view(),
             basis,
             displayName: basis.displayName,
-            assistantTone: basis.assistantTone,
           }
         : { kind, id: view(), basis, prompt: basis.compactionPrompt, useDefault: false },
     );
@@ -172,11 +265,11 @@ export function createGeneralSettings(operations: SettingsOperations, active: ()
   const dirty = () => {
     const form = editor();
     return form?.kind === 'personalization'
-      ? form.displayName !== form.basis.displayName ||
-          form.assistantTone !== form.basis.assistantTone
+      ? form.displayName !== form.basis.displayName
       : form?.kind === 'compaction'
         ? form.useDefault || form.prompt !== form.basis.compactionPrompt
-        : false;
+        : !!form?.document &&
+          (!form.document.basis.exists || form.document.content !== form.document.basis.content);
   };
   const back = () => {
     if (operations.busy()) return false;
@@ -199,12 +292,17 @@ export function createGeneralSettings(operations: SettingsOperations, active: ()
     action,
     navigation: () => JSON.stringify(action()),
     disabled,
+    blocked,
+    globalDocument,
+    saveDisabled: () => disabled() || !dirty() || !!globalDocument()?.conflict,
     dirty,
     activate() {
       if (!alive || enabled) return;
       enabled = true;
       cancelRead();
-      if (!editor()) void load();
+      const form = editor();
+      if (form?.kind === 'globalInstructions' && !form.document) void loadGlobal(form.id);
+      else if (!form) void load();
     },
     deactivate() {
       enabled = false;
@@ -220,11 +318,47 @@ export function createGeneralSettings(operations: SettingsOperations, active: ()
     title: () =>
       editor()?.kind === 'personalization'
         ? tr('Personalization')
-        : editor()?.kind === 'compaction'
-          ? tr('Compaction prompt')
-          : tr('General settings'),
-    open: ({ request, kind }: { request: GeneralAction; kind: Editor['kind'] }) =>
+        : editor()?.kind === 'globalInstructions'
+          ? tr('Global instructions')
+          : editor()?.kind === 'compaction'
+            ? tr('Compaction prompt')
+            : tr('General settings'),
+    open: ({ request, kind }: { request: GeneralAction; kind: PreferencesEditor['kind'] }) =>
       open(request, kind),
+    openGlobal(request: GeneralAction) {
+      if (request.kind !== 'root' || !current(request) || blocked()) return;
+      batch(() => {
+        cancelRead();
+        editor.set({ kind: 'globalInstructions', id: view(), document: null });
+      });
+      void loadGlobal(view());
+    },
+    reloadGlobal(request: GeneralAction) {
+      const form = editor();
+      if (
+        request.kind !== 'globalInstructions' ||
+        !current(request) ||
+        blocked() ||
+        form?.kind !== 'globalInstructions'
+      )
+        return;
+      operations.error.set('');
+      cancelRead();
+      void loadGlobal(form.id);
+    },
+    editGlobal(request: GeneralAction, content: string) {
+      const form = editor();
+      if (
+        request.kind !== 'globalInstructions' ||
+        !current(request) ||
+        disabled() ||
+        form?.kind !== 'globalInstructions' ||
+        !form.document
+      )
+        return;
+      editor.set({ ...form, document: { ...form.document, content } });
+    },
+    recovered: settleGlobal,
     reload(request: GeneralAction) {
       if (!current(request) || request.kind !== 'root' || operations.busy() || loading()) return;
       operations.error.set('');
@@ -255,10 +389,10 @@ export function createGeneralSettings(operations: SettingsOperations, active: ()
       if (request.kind !== 'root' || facts()?.language === preference) return;
       return mutate(request, { kind: 'language', preference });
     },
-    editName(request: GeneralAction, field: 'displayName' | 'assistantTone', text: string) {
+    editName(request: GeneralAction, displayName: string) {
       const form = editor();
       if (!current(request) || disabled() || form?.kind !== 'personalization') return;
-      editor.set({ ...form, [field]: text });
+      editor.set({ ...form, displayName });
     },
     editPrompt(request: GeneralAction, prompt: string) {
       const form = editor();
@@ -273,13 +407,26 @@ export function createGeneralSettings(operations: SettingsOperations, active: ()
     save(request: GeneralAction) {
       const form = editor();
       if (!form || !current(request) || disabled() || !dirty()) return;
+      if (request.kind === 'globalInstructions') {
+        if (form.kind !== 'globalInstructions' || !form.document || form.document.conflict) return;
+        const document = form.document;
+        return operations.run(async () => {
+          if (!current(request)) return;
+          const result = await operations.mutate('agent', 'updateGlobalInstructions', {
+            source: document.basis.source,
+            revision: document.basis.revision,
+            content: document.content,
+          });
+          await settleGlobal(result);
+        });
+      }
+      if (form.kind === 'globalInstructions') return;
       if (form.kind === 'personalization') {
         return mutate(
           request,
           {
             kind: 'personalization',
             displayName: form.displayName,
-            assistantTone: form.assistantTone,
           },
           form,
         );
diff --git a/products/maka/terminal-shell/app/locale-settings.ts b/products/maka/terminal-shell/app/locale-settings.ts
index 109424dff9..e0827989f7 100644
--- a/products/maka/terminal-shell/app/locale-settings.ts
+++ b/products/maka/terminal-shell/app/locale-settings.ts
@@ -109,7 +109,6 @@ export const settingsMessages = {
     '适用于新请求。正在运行的请求会保留原有设置。',
     '適用於新請求。正在執行的請求會保留原有設定。',
   ],
-  'Assistant tone': ['Assistant tone', '助手语气', '助理語氣'],
   Automatic: ['Automatic', '自动', '自動'],
   'Automatic bypass: {domains}': [
     'Automatic bypass: {domains}',
@@ -250,11 +249,6 @@ export const settingsMessages = {
     '捨棄編輯並重新載入',
   ],
   'Display name': tui_model_profile_name,
-  'Display name and assistant tone': [
-    'Display name and assistant tone',
-    '显示名称和助手语气',
-    '顯示名稱和助理語氣',
-  ],
   'Earlier settings actions must be resolved before another change.': [
     'Earlier settings actions must be resolved before another change.',
     '必须先解决先前的设置操作,才能进行其他更改。',
@@ -337,11 +331,6 @@ export const settingsMessages = {
     '主机名或 IP 地址;端口请单独输入。',
     '主機名稱或 IP 位址;連接埠請另行輸入。',
   ],
-  'How the assistant should respond.': [
-    'How the assistant should respond.',
-    '助手应如何回应。',
-    '助理應如何回應。',
-  ],
   Include: ['Include', '包含', '包含'],
   'Include {label}': ['Include {label}', '包含 {label}', '包含 {label}'],
   Included: ['Included', '已包含', '已包含'],
@@ -866,4 +855,52 @@ export const settingsMessages = {
     '{status} · {count} 个模型',
     '{status} · {count} 個模型',
   ],
+  'Global instructions': ['Global instructions', '全局指令', '全域指令'],
+  'Edit global instructions': ['Edit global instructions', '编辑全局指令', '編輯全域指令'],
+  'Reading global instructions…': [
+    'Reading global instructions…',
+    '正在读取全局指令…',
+    '正在讀取全域指令…',
+  ],
+  'Edit the global AGENTS.md used by the assistant.': [
+    'Edit the global AGENTS.md used by the assistant.',
+    '编辑助手使用的全局 AGENTS.md。',
+    '編輯助理使用的全域 AGENTS.md。',
+  ],
+  'Workspace instructions are off, so global instructions are not applied.': [
+    'Workspace instructions are off, so global instructions are not applied.',
+    '工作区指令已关闭,因此不会应用全局指令。',
+    '工作區指令已關閉,因此不會套用全域指令。',
+  ],
+  'This file does not exist. Saving will create it.': [
+    'This file does not exist. Saving will create it.',
+    '此文件尚不存在,保存时会创建。',
+    '此檔案尚不存在,儲存時會建立。',
+  ],
+  'Save global instructions': ['Save global instructions', '保存全局指令', '儲存全域指令'],
+  'Reload (discard edits)': [
+    'Reload (discard edits)',
+    '重新加载(放弃编辑)',
+    '重新載入(捨棄編輯)',
+  ],
+  'Global instructions saved.': [
+    'Global instructions saved.',
+    '全局指令已保存。',
+    '全域指令已儲存。',
+  ],
+  'Source changed. Your draft is preserved. Reload the source before saving again.': [
+    'Source changed. Your draft is preserved. Reload the source before saving again.',
+    '源文件已更改,草稿已保留。请重新加载源文件后再保存。',
+    '來源檔案已變更,草稿已保留。請重新載入來源檔案後再儲存。',
+  ],
+  'Source unavailable. Reload to try again.': [
+    'Source unavailable. Reload to try again.',
+    '源文件不可用。可重新加载以重试。',
+    '來源檔案無法使用。可重新載入以重試。',
+  ],
+  'The Host returned an invalid global instructions result.': [
+    'The Host returned an invalid global instructions result.',
+    'Host 返回了无效的全局指令结果。',
+    'Host 傳回了無效的全域指令結果。',
+  ],
 } as const satisfies Catalog;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org