Skip to content

Commit fa3a3ea

Browse files
committed
style(cli): format OMP agent directory changes
Signed-off-by: DavidHLP <lysf15520112973@163.com>
1 parent 410cd9a commit fa3a3ea

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

‎src/cli/agent_clients.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ static const cbm_agent_client_profile_t agent_profiles[CBM_AGENT_CLIENT_COUNT] =
7474
{CBM_AGENT_CLIENT_SOURCEGRAPH_CODY, "sourcegraph-cody", "Sourcegraph Cody", CBM_AGENT_OPT_IN,
7575
CBM_AGENT_CAP_MCP, NULL, agent_install_callback, agent_remove_callback},
7676
{CBM_AGENT_CLIENT_OMP, "omp", "Oh My Pi (omp)", CBM_AGENT_STABLE,
77-
CBM_AGENT_CAP_MCP | CBM_AGENT_CAP_SKILL | CBM_AGENT_CAP_AGENT, "omp",
78-
agent_install_callback, agent_remove_callback},
77+
CBM_AGENT_CAP_MCP | CBM_AGENT_CAP_SKILL | CBM_AGENT_CAP_AGENT, "omp", agent_install_callback,
78+
agent_remove_callback},
7979
};
8080

8181
size_t cbm_agent_client_count(void) {

‎src/cli/cli.c‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8562,12 +8562,11 @@ static void install_pochi_durable_context(const char *home, bool force, bool dry
85628562
dry_run);
85638563
}
85648564

8565-
static void install_omp_durable_context(const cbm_agent_registry_context_t *registry,
8566-
bool force, bool dry_run) {
8567-
const char *agent_dir = registry->options.omp_agent_dir
8568-
&& registry->options.omp_agent_dir[0]
8569-
? registry->options.omp_agent_dir
8570-
: NULL;
8565+
static void install_omp_durable_context(const cbm_agent_registry_context_t *registry, bool force,
8566+
bool dry_run) {
8567+
const char *agent_dir = registry->options.omp_agent_dir && registry->options.omp_agent_dir[0]
8568+
? registry->options.omp_agent_dir
8569+
: NULL;
85718570
char resolved_dir[CLI_BUF_1K];
85728571
if (!agent_dir) {
85738572
int written = snprintf(resolved_dir, sizeof(resolved_dir), "%s/.omp/agent",
@@ -10879,10 +10878,9 @@ static void uninstall_pochi_durable_context(const char *home, bool dry_run) {
1087910878

1088010879
static void uninstall_omp_durable_context(const cbm_agent_registry_context_t *registry,
1088110880
bool dry_run) {
10882-
const char *agent_dir = registry->options.omp_agent_dir
10883-
&& registry->options.omp_agent_dir[0]
10884-
? registry->options.omp_agent_dir
10885-
: NULL;
10881+
const char *agent_dir = registry->options.omp_agent_dir && registry->options.omp_agent_dir[0]
10882+
? registry->options.omp_agent_dir
10883+
: NULL;
1088610884
char resolved_dir[CLI_BUF_1K];
1088710885
if (!agent_dir) {
1088810886
int written = snprintf(resolved_dir, sizeof(resolved_dir), "%s/.omp/agent",

0 commit comments

Comments
 (0)