Skip to content

Commit d609f4d

Browse files
committed
feat(ai): contribute navigation items to Setup App if SetupPlugin is loaded
1 parent f23bb9d commit d609f4d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

packages/services/service-ai/src/plugin.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,23 @@ export class AIServicePlugin implements Plugin {
118118
});
119119
}
120120

121+
// Contribute navigation items to the Setup App (if SetupPlugin is loaded).
122+
try {
123+
const setupNav = ctx.getService<{ contribute(c: any): void }>('setupNav');
124+
if (setupNav) {
125+
setupNav.contribute({
126+
areaId: 'area_ai',
127+
items: [
128+
{ id: 'nav_ai_conversations', type: 'object', label: { key: 'setup.nav.ai_conversations', defaultValue: 'Conversations' }, objectName: 'conversations', icon: 'message-square', order: 10 },
129+
{ id: 'nav_ai_messages', type: 'object', label: { key: 'setup.nav.ai_messages', defaultValue: 'Messages' }, objectName: 'messages', icon: 'messages-square', order: 20 },
130+
],
131+
});
132+
ctx.logger.info('[AI] Navigation items contributed to Setup App');
133+
}
134+
} catch {
135+
// SetupPlugin not loaded — skip silently
136+
}
137+
121138
ctx.logger.info('[AI] Service initialized');
122139
}
123140

0 commit comments

Comments
 (0)