Skip to content

Commit b7049b3

Browse files
committed
✏️ more review fixes
1 parent 86ee72e commit b7049b3

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

src/sentry/integrations/slack/requests/event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def user_id(self) -> str:
7575
def thread_ts(self) -> str:
7676
if self.is_assistant_thread_event:
7777
return self.dm_data.get("assistant_thread", {}).get("thread_ts", "")
78-
return self.dm_data.get("ts", "")
78+
return self.dm_data.get("thread_ts") or self.dm_data.get("ts", "")
7979

8080
@property
8181
def has_assistant_scope(self):

src/sentry/integrations/slack/webhooks/event.py

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,24 @@
4646

4747
_logger = logging.getLogger(__name__)
4848

49+
_SEER_STARTING_PROMPTS = [
50+
{
51+
"title": "Summarize recent issues",
52+
"message": "What are the most important unresolved issues in my projects right now?",
53+
},
54+
{
55+
"title": "Investigate an error",
56+
"message": "Help me investigate what's causing errors in my project.",
57+
},
58+
{
59+
"title": "Explain a stack trace",
60+
"message": "Can you explain the root cause of this stack trace?",
61+
},
62+
{
63+
"title": "Find performance bottlenecks",
64+
"message": "What are the slowest endpoints or pages in my projects?",
65+
},
66+
]
4967
_SEER_LOADING_MESSAGES = [
5068
"Digging through your errors...",
5169
"Sifting through stack traces...",
@@ -544,24 +562,7 @@ def on_assistant_thread_started(self, slack_request: SlackEventRequest) -> Respo
544562
channel_id=channel_id,
545563
thread_ts=thread_ts,
546564
title="Hi there! I'm Seer, Sentry's AI assistant. How can I help?",
547-
prompts=[
548-
{
549-
"title": "Summarize recent issues",
550-
"message": "What are the most important unresolved issues in my projects right now?",
551-
},
552-
{
553-
"title": "Investigate an error",
554-
"message": "Help me investigate what's causing errors in my project.",
555-
},
556-
{
557-
"title": "Explain a stack trace",
558-
"message": "Can you explain the root cause of this stack trace?",
559-
},
560-
{
561-
"title": "Find performance bottlenecks",
562-
"message": "What are the slowest endpoints or pages in my projects?",
563-
},
564-
],
565+
prompts=_SEER_STARTING_PROMPTS,
565566
)
566567
except Exception:
567568
_logger.exception(

src/sentry/seer/entrypoints/slack/messaging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def send_identity_link_prompt(
278278
from sentry.integrations.slack.views.link_identity import build_linking_url
279279

280280
# TODO(leander): We'll need to revisit the UX around linking. We can't pass threads here so while
281-
# the linking start message is correctly located and ephemeral, the success message afterwards is not.abs
281+
# the linking start message is correctly located and ephemeral, the success message afterwards is not.
282282
# By omitting the response_url here, it will arrive as a DM, but it doesn't accept threads so this is the best we can do for now.
283283
associate_url = build_linking_url(
284284
integration=integration,

0 commit comments

Comments
 (0)