@@ -203,7 +203,8 @@ class AppState extends State<CmdBridgeApp> {
203203
204204 if (_panel == _Panel .quit) {
205205 if (e.logicalKey == LogicalKey .keyY ||
206- e.logicalKey == LogicalKey .enter) {
206+ e.logicalKey == LogicalKey .enter ||
207+ (e.logicalKey == LogicalKey .keyC && e.isControlPressed)) {
207208 _doQuit ();
208209 return true ;
209210 }
@@ -247,6 +248,13 @@ class AppState extends State<CmdBridgeApp> {
247248 }
248249
249250 if (_panel == _Panel .main) {
251+ if (e.logicalKey == LogicalKey .keyC && e.isControlPressed) {
252+ _panel = _Panel .quit;
253+ _setStatus ('Press q or Ctrl+C to quit' , duration: 10 );
254+ setState (() {});
255+ return true ;
256+ }
257+
250258 if (e.logicalKey == LogicalKey .keyL && e.isControlPressed) {
251259 _showLog = ! _showLog;
252260 if (_showLog) _logFullscreen = false ;
@@ -320,10 +328,14 @@ class AppState extends State<CmdBridgeApp> {
320328 _refreshData (foreground: true );
321329 return true ;
322330
323- case LogicalKey .keyC :
331+ case LogicalKey .keyO :
324332 _copyEndpointUrl ();
325333 return true ;
326334
335+ case LogicalKey .keyA:
336+ _copyAnthropicUrl ();
337+ return true ;
338+
327339 case LogicalKey .keyP:
328340 _showPortConfig ();
329341 return true ;
@@ -463,12 +475,27 @@ class AppState extends State<CmdBridgeApp> {
463475 }
464476
465477 void _copyEndpointUrl () {
466- final url = 'http://127.0.0.1:${_config .config .serverPort }/v1' ;
467- _setStatus ('Copying endpoint URL...' );
478+ final port = _config.config.serverPort;
479+ final url = 'http://127.0.0.1:$port /v1' ;
480+ _setStatus ('Copying OpenAI endpoint...' );
481+ _copyNative (url).then ((ok) {
482+ if (ok) {
483+ _setStatus ('Copied OpenAI: $url ' , duration: 4 );
484+ LogStore .info ('Copied OpenAI endpoint URL' );
485+ } else {
486+ _setStatus ('Clipboard copy failed' , duration: 4 );
487+ }
488+ });
489+ }
490+
491+ void _copyAnthropicUrl () {
492+ final port = _config.config.serverPort;
493+ final url = 'http://127.0.0.1:$port ' ;
494+ _setStatus ('Copying Anthropic endpoint...' );
468495 _copyNative (url).then ((ok) {
469496 if (ok) {
470- _setStatus ('Copied endpoint : $url ' , duration: 4 );
471- LogStore .info ('Copied endpoint URL' );
497+ _setStatus ('Copied Anthropic : $url ' , duration: 4 );
498+ LogStore .info ('Copied Anthropic endpoint URL' );
472499 } else {
473500 _setStatus ('Clipboard copy failed' , duration: 4 );
474501 }
@@ -631,6 +658,7 @@ class AppState extends State<CmdBridgeApp> {
631658 final email = whoami? .email ?? '' ;
632659 final planName = sub != null ? _planDisplayName (sub.planId) : '' ;
633660 final isRunning = _proxy.isRunning;
661+ final port = _config.config.serverPort;
634662
635663 return Container (
636664 padding: const EdgeInsets .all (1 ),
@@ -644,7 +672,7 @@ class AppState extends State<CmdBridgeApp> {
644672 children: [
645673 Text ('CommandCode Bridge' ,
646674 style: const TextStyle (fontWeight: FontWeight .bold)),
647- Text (' OpenAI Compatible ' ,
675+ Text (' OpenAI + Anthropic ' ,
648676 style: TextStyle (color: Colors .green)),
649677 Text (' | ' , style: TextStyle (color: Colors .grey)),
650678 Text (displayName, style: const TextStyle (color: Colors .cyan)),
@@ -665,10 +693,20 @@ class AppState extends State<CmdBridgeApp> {
665693 ),
666694 Row (
667695 children: [
668- Text ('\u 25b8 http://127.0.0.1:${_config .config .serverPort }/v1' ,
696+ Text ('\u 25b8 OpenAI: ' ,
697+ style: TextStyle (color: Colors .grey)),
698+ Text ('http://127.0.0.1:$port /v1' ,
669699 style: const TextStyle (color: Colors .green)),
670- Text (' [c]' , style: TextStyle (color: Colors .green, fontWeight: FontWeight .bold)),
671- Text ('opy endpoint url' , style: TextStyle (color: Colors .grey)),
700+ Text (' [o] copy' , style: TextStyle (color: Colors .green, fontWeight: FontWeight .bold)),
701+ ],
702+ ),
703+ Row (
704+ children: [
705+ Text ('\u 25b8 Anthropic: ' ,
706+ style: TextStyle (color: Colors .grey)),
707+ Text ('http://127.0.0.1:$port ' ,
708+ style: const TextStyle (color: Colors .cyan)),
709+ Text (' [a] copy' , style: TextStyle (color: Colors .cyan, fontWeight: FontWeight .bold)),
672710 const Spacer (),
673711 Text ('Last used: ${_proxy .currentModel }' ,
674712 style: TextStyle (color: Colors .grey)),
@@ -1078,11 +1116,18 @@ class AppState extends State<CmdBridgeApp> {
10781116 add ('' );
10791117 add ('Endpoints' , Colors .cyan);
10801118 add ('' );
1081- add ('POST /v1/chat/completions OpenAI-compatible chat' );
1082- add ('GET /v1/models List available models' );
1083- add ('GET /v1/health Health check' );
1084- add ('GET /v1/token Get access token' );
1085- add ('GET /v1/info Bridge info' );
1119+ add ('OpenAI:' );
1120+ add (' http://127.0.0.1:${_config .config .serverPort }/v1' );
1121+ add (' POST /v1/chat/completions Chat completions' );
1122+ add (' GET /v1/models List models' );
1123+ add (' GET /v1/health Health check' );
1124+ add (' GET /v1/token Access token' );
1125+ add (' GET /v1/info Bridge info' );
1126+ add ('' );
1127+ add ('Anthropic:' );
1128+ add (' http://127.0.0.1:${_config .config .serverPort }' );
1129+ add (' POST /v1/messages Messages API' );
1130+ add (' POST /messages Messages API (alt)' );
10861131 add ('' );
10871132 add ('API Key: any value works (bridge uses your saved auth)' );
10881133 break ;
@@ -1265,12 +1310,18 @@ class AppState extends State<CmdBridgeApp> {
12651310 add ('' );
12661311 add ('Other:' , Colors .cyan);
12671312 add ('' );
1268- add (' [c] Copy endpoint URL (http://.../v1) to clipboard' );
1313+ add (' [o] Copy OpenAI endpoint URL (http://.../v1) to clipboard' );
1314+ add (' [a] Copy Anthropic endpoint URL (http://... base) to clipboard' );
12691315 add (' [p] Configure proxy port' );
12701316 add (' [l] Login panel (if not authenticated)' );
12711317 add (' [h] Show this help' );
12721318 add (' [q] Quit' );
12731319 add ('' );
1320+ add ('Endpoints:' , Colors .cyan);
1321+ add ('' );
1322+ add (' OpenAI: http://127.0.0.1:${_config .config .serverPort }/v1' );
1323+ add (' Anthropic: http://127.0.0.1:${_config .config .serverPort }' );
1324+ add ('' );
12741325 add ('Links:' , Colors .cyan);
12751326 add ('' );
12761327 add (' Docs: https://commandcode.ai/docs' );
@@ -1514,8 +1565,10 @@ class AppState extends State<CmdBridgeApp> {
15141565 children: [
15151566 Text ('Actions:' , style: TextStyle (color: Colors .cyan, fontWeight: FontWeight .bold)),
15161567 if (_account.isLoaded) ...[
1517- Text (' [c]' , style: TextStyle (color: Colors .green, fontWeight: FontWeight .bold)),
1518- Text ('opy endpoint url ' , style: TextStyle (color: Colors .grey)),
1568+ Text (' [o]' , style: TextStyle (color: Colors .green, fontWeight: FontWeight .bold)),
1569+ Text ('penai url ' , style: TextStyle (color: Colors .grey)),
1570+ Text ('[a]' , style: TextStyle (color: Colors .cyan, fontWeight: FontWeight .bold)),
1571+ Text ('nthropic url ' , style: TextStyle (color: Colors .grey)),
15191572 Text ('[r]' , style: TextStyle (color: Colors .cyan, fontWeight: FontWeight .bold)),
15201573 Text ('efresh ' , style: TextStyle (color: Colors .grey)),
15211574 Text ('[p]' , style: TextStyle (color: Colors .yellow, fontWeight: FontWeight .bold)),
0 commit comments