MCPcopy Index your code
hub / github.com/codeaashu/claude-code / markGroveNoticeViewed

Function markGroveNoticeViewed

src/services/api/grove.ts:90–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88 * Mark that the Grove notice has been viewed by the user
89 */
90export async function markGroveNoticeViewed(): Promise<void> {
91 try {
92 await withOAuth401Retry(() => {
93 const authHeaders = getAuthHeaders()
94 if (authHeaders.error) {
95 throw new Error(`Failed to get auth headers: ${authHeaders.error}`)
96 }
97 return axios.post(
98 `${getOauthConfig().BASE_API_URL}/api/oauth/account/grove_notice_viewed`,
99 {},
100 {
101 headers: {
102 ...authHeaders.headers,
103 'User-Agent': getClaudeCodeUserAgent(),
104 },
105 },
106 )
107 })
108 // This mutates grove_notice_viewed_at server-side — Grove.tsx:87 reads it
109 // to decide whether to show the dialog. Without invalidation a same-session
110 // remount would read stale viewed_at:null and re-show the dialog.
111 getGroveSettings.cache.clear?.()
112 } catch (err) {
113 logError(err)
114 }
115}
116
117/**
118 * Update Grove settings for the user account

Callers 2

checkGroveSettingsFunction · 0.85

Calls 7

withOAuth401RetryFunction · 0.85
getOauthConfigFunction · 0.85
getClaudeCodeUserAgentFunction · 0.85
postMethod · 0.80
getAuthHeadersFunction · 0.50
logErrorFunction · 0.50
clearMethod · 0.45

Tested by

no test coverage detected