Skip to content

Fix: restore home ambient suggestions - #21

Open
xIGBClutchIx wants to merge 1 commit into
davej:mainfrom
xIGBClutchIx:fix/ambient-suggestions-route
Open

Fix: restore home ambient suggestions#21
xIGBClutchIx wants to merge 1 commit into
davej:mainfrom
xIGBClutchIx:fix/ambient-suggestions-route

Conversation

@xIGBClutchIx

Copy link
Copy Markdown
Contributor

Summary

This restores ambient suggestions on the New chat view in Pocodex by implementing the missing vscode://codex/ambient-suggestions bridge contract and the related ambient-suggestion routes the current Codex bundle now calls.

What changed

  • add app-server bridge handlers for ambient-suggestions, ambient-suggestions-refresh, ambient-suggestions-generation-statuses, and ambient-suggestion-set-status
  • return the file.currentSuggestionIds and file.suggestions payload shape the current Codex bundle expects, backed by a small in-memory ambient suggestion store
  • keep refresh and generation-status requests on the supported host fetch path instead of falling through to the generic unsupported-route response
  • add focused regression coverage for ambient suggestion fetch, status update, refresh, and generation-status flows in test/app-server-bridge-host-data.test.ts

Root cause

  • the current Codex bundle loads home-view ambient suggestions through vscode://codex/ambient-suggestions
  • Pocodex did not implement that host fetch route or its related ambient-suggestion helpers, so those requests fell through to the default 501 unsupported path
  • once that bridge contract failed, the New chat surface could not load ambient suggestion data and surfaced the route failure instead of normal suggestion behavior

Impact

  • New chat no longer fails on the missing ambient-suggestions host fetch path
  • ambient suggestion consumers now receive the payload shape they expect, including a safe empty-state response and working refresh/status endpoints
  • focused regression coverage now protects this host bridge contract from falling back to unsupported-route behavior again

Validation

  • pnpm run check:commit
  • pnpm vitest run test/app-server-bridge-host-data.test.ts
  • pnpm exec tsx src/cli.ts --dev --listen 127.0.0.1:8793
  • live local verification on http://127.0.0.1:8793/ that New chat rendered What should we work on in pocodex? and did not show Unsupported Codex host fetch URL: vscode://codex/ambient-suggestions

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