Skip to content

Commit 484920d

Browse files
authored
Merge branch 'main' into mwbrooks-rename-helpdesk-to-support
2 parents d3b5190 + d44f7ef commit 484920d

6 files changed

Lines changed: 78 additions & 9 deletions

File tree

claude-agent-sdk/listeners/views/app_home_builder.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,27 @@ def build_app_home_view(
128128
],
129129
}
130130
)
131+
else:
132+
blocks.append(
133+
{
134+
"type": "section",
135+
"text": {
136+
"type": "mrkdwn",
137+
"text": "\U0001f534 *Slack MCP Server is disconnected.* <https://github.com/slack-samples/bolt-python-support-agent/blob/main/claude-agent-sdk/README.md#slack-mcp-server|Learn how to enable the Slack MCP Server.>",
138+
},
139+
}
140+
)
141+
blocks.append(
142+
{
143+
"type": "context",
144+
"elements": [
145+
{
146+
"type": "mrkdwn",
147+
"text": "The Slack MCP Server enables Casey to search messages, read channels, and more.",
148+
}
149+
],
150+
}
151+
)
131152

132153
return {
133154
"type": "home",

claude-agent-sdk/tests/test_view_builders.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_build_feedback_blocks():
2626

2727

2828
def test_build_app_home_view_default():
29-
"""Default args (app.py mode) — no MCP status section."""
29+
"""Default args (Socket Mode) — shows disconnected status with learn-more link."""
3030
view = build_app_home_view()
3131

3232
assert view["type"] == "home"
@@ -35,11 +35,13 @@ def test_build_app_home_view_default():
3535
actions_block = next(b for b in view["blocks"] if b["type"] == "actions")
3636
assert len(actions_block["elements"]) == len(CATEGORIES)
3737

38-
# No MCP status section
38+
# Shows MCP status as disconnected with learn-more link
3939
section_texts = [
4040
b["text"]["text"] for b in view["blocks"] if b["type"] == "section"
4141
]
42-
assert not any("Slack MCP Server" in t for t in section_texts)
42+
mcp_section = next(t for t in section_texts if "Slack MCP Server" in t)
43+
assert "disconnected" in mcp_section
44+
assert "Learn how to enable" in mcp_section
4345

4446

4547
def test_build_app_home_view_connect():

openai-agents-sdk/listeners/views/app_home_builder.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,27 @@ def build_app_home_view(
128128
],
129129
}
130130
)
131+
else:
132+
blocks.append(
133+
{
134+
"type": "section",
135+
"text": {
136+
"type": "mrkdwn",
137+
"text": "\U0001f534 *Slack MCP Server is disconnected.* <https://github.com/slack-samples/bolt-python-support-agent/blob/main/openai-agents-sdk/README.md#slack-mcp-server|Learn how to enable the Slack MCP Server.>",
138+
},
139+
}
140+
)
141+
blocks.append(
142+
{
143+
"type": "context",
144+
"elements": [
145+
{
146+
"type": "mrkdwn",
147+
"text": "The Slack MCP Server enables Casey to search messages, read channels, and more.",
148+
}
149+
],
150+
}
151+
)
131152

132153
return {
133154
"type": "home",

openai-agents-sdk/tests/test_view_builders.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_build_feedback_blocks():
2626

2727

2828
def test_build_app_home_view_default():
29-
"""Default args (app.py mode) — no MCP status section."""
29+
"""Default args (Socket Mode) — shows disconnected status with learn-more link."""
3030
view = build_app_home_view()
3131

3232
assert view["type"] == "home"
@@ -35,11 +35,13 @@ def test_build_app_home_view_default():
3535
actions_block = next(b for b in view["blocks"] if b["type"] == "actions")
3636
assert len(actions_block["elements"]) == len(CATEGORIES)
3737

38-
# No MCP status section
38+
# Shows MCP status as disconnected with learn-more link
3939
section_texts = [
4040
b["text"]["text"] for b in view["blocks"] if b["type"] == "section"
4141
]
42-
assert not any("Slack MCP Server" in t for t in section_texts)
42+
mcp_section = next(t for t in section_texts if "Slack MCP Server" in t)
43+
assert "disconnected" in mcp_section
44+
assert "Learn how to enable" in mcp_section
4345

4446

4547
def test_build_app_home_view_connect():

pydantic-ai/listeners/views/app_home_builder.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,27 @@ def build_app_home_view(
128128
],
129129
}
130130
)
131+
else:
132+
blocks.append(
133+
{
134+
"type": "section",
135+
"text": {
136+
"type": "mrkdwn",
137+
"text": "🔴 *Slack MCP Server is disconnected.* <https://github.com/slack-samples/bolt-python-support-agent/blob/main/pydantic-ai/README.md#slack-mcp-server|Learn how to enable the Slack MCP Server.>",
138+
},
139+
}
140+
)
141+
blocks.append(
142+
{
143+
"type": "context",
144+
"elements": [
145+
{
146+
"type": "mrkdwn",
147+
"text": "The Slack MCP Server enables Casey to search messages, read channels, and more.",
148+
}
149+
],
150+
}
151+
)
131152

132153
return {
133154
"type": "home",

pydantic-ai/tests/test_view_builders.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_build_feedback_blocks():
2626

2727

2828
def test_build_app_home_view_default():
29-
"""Default args (app.py mode) — no MCP status section."""
29+
"""Default args (Socket Mode) — shows disconnected status with learn-more link."""
3030
view = build_app_home_view()
3131

3232
assert view["type"] == "home"
@@ -35,11 +35,13 @@ def test_build_app_home_view_default():
3535
actions_block = next(b for b in view["blocks"] if b["type"] == "actions")
3636
assert len(actions_block["elements"]) == len(CATEGORIES)
3737

38-
# No MCP status section
38+
# Shows MCP status as disconnected with learn-more link
3939
section_texts = [
4040
b["text"]["text"] for b in view["blocks"] if b["type"] == "section"
4141
]
42-
assert not any("Slack MCP Server" in t for t in section_texts)
42+
mcp_section = next(t for t in section_texts if "Slack MCP Server" in t)
43+
assert "disconnected" in mcp_section
44+
assert "Learn how to enable" in mcp_section
4345

4446

4547
def test_build_app_home_view_connect():

0 commit comments

Comments
 (0)