Skip to content

Fix Expert Skills calling a non-existent web-mode endpoint - #15

Open
PanAndDuck wants to merge 1 commit into
xintaofei:mainfrom
PanAndDuck:ios/fix-experts-list-endpoint
Open

PanAndDuck wants to merge 1 commit into
xintaofei:mainfrom
PanAndDuck:ios/fix-experts-list-endpoint

Conversation

@PanAndDuck

Copy link
Copy Markdown

Summary

  • The compose bar's "+" → Expert Skills list posted to experts_list_for_agent, an endpoint that does not exist anywhere server-side (not a Tauri command, not a web route). Every request 501'd with API endpoint 'experts_list_for_agent' is not available in web mode, so Expert Skills was permanently broken whenever the app talked to codeg-server / the desktop app's Web Service — i.e. any non-LAN setup.
  • There is no server-side "experts for one agent" endpoint at all. The web client derives this client-side too (use-enabled-skill-ids.ts): fetch the global expert catalog (experts_list) plus the bulk per-(expert, agent) link-status snapshot (experts_list_all_install_statuses), then keep only entries linked to the agent in question.
  • CodegClient.experts(agentType:) now does the same; a new expertsAllInstallStatuses() wraps the bulk endpoint (already modeled by the existing ExpertInstallStatus type used elsewhere in Settings).

Test plan

  • Builds and runs on iOS Simulator
  • Builds, installs, and runs on a physical device against a codeg-server (Web Service) instance
  • Expert Skills now lists the expected agent-linked experts instead of erroring

The "+" menu's Expert Skills list posted to `experts_list_for_agent`,
which does not exist anywhere server-side (not as a Tauri command, not
as a web route) — every request 501'd with "API endpoint
'experts_list_for_agent' is not available in web mode" whenever the app
talked to codeg-server / the desktop app's Web Service (i.e. any non-LAN
setup), leaving Expert Skills permanently broken there.

There is no server-side "experts for one agent" endpoint at all — the
web client derives this client-side too (see its
`use-enabled-skill-ids.ts`): fetch the global expert catalog
(`experts_list`) plus the bulk per-(expert, agent) link-status snapshot
(`experts_list_all_install_statuses`), then keep only the entries linked
to the agent in question. `CodegClient.experts(agentType:)` now does the
same, and a new `expertsAllInstallStatuses()` wraps the bulk endpoint.

Verified: builds and runs on Simulator and a physical device against a
codeg-server (Web Service) instance; Expert Skills now lists the
expected linked experts instead of erroring.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant