A released-but-superseded rendering, kept only so install/uninstall can * recognise and migrate files an older release wrote. */
| 721 | /* A released-but-superseded rendering, kept only so install/uninstall can |
| 722 | * recognise and migrate files an older release wrote. */ |
| 723 | static char *render_released_profile(cbm_graph_profile_dialect_t dialect, cbm_graph_tier_t tier, |
| 724 | cbm_graph_access_t access) { |
| 725 | if (!tier_valid(tier) || !access_valid(access)) { |
| 726 | return NULL; |
| 727 | } |
| 728 | char *prompt = cbm_render_graph_prompt(tier, access); |
| 729 | if (!prompt) { |
| 730 | return NULL; |
| 731 | } |
| 732 | profile_buffer_t buffer; |
| 733 | profile_buffer_init(&buffer); |
| 734 | bool ok = dialect == CBM_GRAPH_DIALECT_OPENCODE |
| 735 | ? append_opencode_profile(&buffer, tier, access, prompt, true) |
| 736 | : append_codex_profile(&buffer, tier, access, NULL, prompt, true); |
| 737 | free(prompt); |
| 738 | if (!ok) { |
| 739 | profile_buffer_discard(&buffer); |
| 740 | return NULL; |
| 741 | } |
| 742 | return profile_buffer_finish(&buffer); |
| 743 | } |
| 744 | |
| 745 | char *cbm_render_graph_profile_opencode_v0108(cbm_graph_tier_t tier, cbm_graph_access_t access) { |
| 746 | return render_released_profile(CBM_GRAPH_DIALECT_OPENCODE, tier, access); |
no test coverage detected