feat: add managed system prompt optimization
Add an opt-in OpenCode plugin that replaces the built-in provider behavioral prompt with a minimal identity while preserving environment, project, MCP, skill, history, and tool context. Track the active agent per session and apply the transform only to build and plan. Keep plan/build mode reminders and permission enforcement owned by OpenCode, leave all other agents untouched, and fail safely when the expected prompt boundary is absent. Expose the feature in Behavior settings with localized guidance, explicit Save + Reload application, settings search integration, persisted boolean validation, and managed-runtime lifecycle composition that does not load the plugin while disabled or on external OpenCode servers. Document the runtime contract and cover plugin materialization, config preservation, build/plan selection, agent switching, unknown prompt formats, and settings sanitization.
This commit is contained in:
@@ -579,6 +579,11 @@ export const settingsDict = {
|
||||
'settings.behavior.page.warning.title': 'グローバルルールはプロジェクトルールと組み合わされます',
|
||||
'settings.behavior.page.warning.description': 'ここでの変更は {path} を更新します。OpenCode はプロジェクトレベルの AGENTS.md ルールも存在する場合は含めます。',
|
||||
'settings.behavior.page.section.systemPrompt': 'グローバル AGENTS.md',
|
||||
'settings.behavior.page.section.systemPromptOptimization': 'システムプロンプトの最適化',
|
||||
'settings.behavior.page.systemPromptOptimization.enable': 'システムプロンプトのサイズを最適化',
|
||||
'settings.behavior.page.systemPromptOptimization.enableAria': 'OpenCode のシステムプロンプトサイズを最適化',
|
||||
'settings.behavior.page.systemPromptOptimization.info': 'build と plan エージェントのシステムプロンプトを約 40% 削減します。他のエージェントは変更されません。build または plan を上書きするカスタム定義が削除される可能性があるため、そのようなワークフローでは有効にしないでください。OpenCode の再起動後に変更が適用されます。',
|
||||
'settings.behavior.page.systemPromptOptimization.restarting': 'システムプロンプトの最適化を適用するため OpenCode を再起動しています…',
|
||||
'settings.behavior.page.field.systemPromptPlaceholder': 'あなたは役立つ AI アシスタントです...\n\nこのスペースを使用して、すべての Session と Provider にわたって AI の動作方法に関する絶対的なルールを定義してください。',
|
||||
'settings.behavior.page.section.responseStyle': '応答スタイル',
|
||||
'settings.behavior.page.responseStyle.tooltip': '有効にすると、これらの指示は新しい会話ごとにアシスタントの応答方法をガイドします。最初のメッセージとともに送信され、グローバル AGENTS.md ルールは変更しません。',
|
||||
|
||||
Reference in New Issue
Block a user