Skip to content

feat: add newChat as URL param and top-level trigger param#24

Open
naftalis-elementor wants to merge 1 commit into
masterfrom
feat/angie-new-chat-url-param
Open

feat: add newChat as URL param and top-level trigger param#24
naftalis-elementor wants to merge 1 commit into
masterfrom
feat/angie-new-chat-url-param

Conversation

@naftalis-elementor
Copy link
Copy Markdown

@naftalis-elementor naftalis-elementor commented Mar 5, 2026

Summary

  • URL param: #angie-prompt=...&angie-new-chat=1 — when present, opens in new chat.
  • API: newChat is now a top-level field on AngieTriggerRequest (no longer under options).
  • Flow: handlePromptHash parses angie-new-chat=1 from the hash and passes newChat into triggerAngie; sdk.ts forwards newChat in the payload to the iframe.

Changes

  • src/types.ts: newChat?: boolean on AngieTriggerRequest; options only has timeout.
  • src/angie-mcp-sdk.ts: Parse angie-new-chat=1 in hash, pass newChat to triggerAngie and in postMessage payload.
  • src/sdk.ts: Destructure and forward newChat (not options) to iframe.

Testing

  • npm test / npx jest — all 12 suites, 113 tests pass.

✨ PR Description

Purpose: Add newChat parameter to SDK trigger API and URL hash parsing to enable control over chat session creation from external integrations.

Main changes:

  • Added newChat boolean parameter to AngieTriggerRequest interface and SDK message payload forwarding chain
  • Implemented URL hash parameter parsing for &angie-new-chat=1 flag in hash-based trigger initialization
  • Removed unused options field from SDK_TRIGGER_ANGIE message payload in favor of top-level newChat parameter

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

- Add angie-new-chat=1 hash param for prompt URLs (#angie-prompt=...&angie-new-chat=1)
- Move newChat from options to top-level in AngieTriggerRequest (types, payload)
- Parse newChat from URL in handlePromptHash; forward newChat in sdk.ts relay
@wiz-9a149474ff
Copy link
Copy Markdown

wiz-9a149474ff Bot commented Mar 5, 2026

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 1 Low
Software Management Finding Software Management Findings -
Total 1 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant