Deduped prompt-hint decision for a Cursor `beforeSubmitPrompt` event, mirroring [`super::codex::codex_prompt_hint`]. Runs the same prompt-path `decide_hint` (session recall, project context, call graph, impact categories) and suppresses hints already emitted for the session / in uninitialized workspaces.
(event_json: &str)
| 140 | /// (session recall, project context, call graph, impact categories) and suppresses |
| 141 | /// hints already emitted for the session / in uninitialized workspaces. |
| 142 | fn cursor_prompt_hint(event_json: &str) -> Option<ToolHint> { |
| 143 | let parsed = serde_json::from_str::<Value>(event_json).ok()?; |
| 144 | let hint = decide_hint(&ToolHintInput { |
| 145 | agent: HintAgent::Cursor, |
| 146 | session_id: event_session_id(&parsed), |
| 147 | tool_name: None, |
| 148 | command: None, |
| 149 | prompt: prompt_like_text(&parsed), |
| 150 | subagent_type: None, |
| 151 | file_path: None, |
| 152 | hints_enabled: true, |
| 153 | })?; |
| 154 | let root = cursor_project_root_candidate_from_parsed_event(&parsed); |
| 155 | let hint_id = mint_hint_id(); |
| 156 | record_hint_analytics( |
| 157 | root.as_deref(), |
| 158 | "hint_candidate", |
| 159 | HintAgent::Cursor, |
| 160 | event_session_id(&parsed).as_deref(), |
| 161 | &hint_id, |
| 162 | &hint, |
| 163 | ); |
| 164 | deduped_cursor_hint(event_json, &hint_id, hint) |
| 165 | } |
| 166 | |
| 167 | async fn cursor_prompt_memory_recall(event_json: &str) -> Option<String> { |
| 168 | let parsed = serde_json::from_str::<Value>(event_json).ok()?; |