What It’s For
A few examples of context a page might declare:- An invoice detail page sets the label to
Invoice #1042 (overdue)and instructs Starcat to offer drafting a payment reminder. - A customer record page shares
plan: pro, MRR: $240, 14 days overdueas details, so answers reference the real numbers. - A dashboard tells Starcat which metric the user is focused on and what actions make sense from here.
Adding It
Page context is set with theuseStardeckPageContext hook from @stardeck-customer-apps/client-utils (included in every app). Call it from any page or component and pass what you want Starcat to know:
The context updates whenever the values change and clears automatically when the user navigates away from the page or the component unmounts. Pass
null to clear it yourself.