Skip to content

Commit c721b51

Browse files
zimegClaudeclaude
committed
docs(methods): match agents.conversations examples to docs #816 verbatim
Align each example's payload with the request example on its docs.slack.dev reference page (docs #816): - create: session_id + 'Migrate billing cron to Temporal' name - archive: summary_message_ts - setProperties: full 4-item context_bar_items (repo/branch/pr/ci) - setView: html view with view_key/name/csp - setCommands: create-pr (argument_hint) + run-tests - removeView: identify by view_key - getCanvas: include_resolved - setCanvasContent: migration-plan content Duplicates the canonical examples rather than inventing variants. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b1208f8 commit c721b51

9 files changed

Lines changed: 47 additions & 25 deletions

‎methods/src/agents/conversations/agents_conversations_archive.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
# Call the agents.conversations.archive method
1212
response = client.agents_conversations_archive(
13-
channel_id="C123ABC456",
14-
summary_message_ts="1717171717.123456",
13+
channel_id="C9876543210",
14+
summary_message_ts="1717182000.456789",
1515
)
1616

1717
# Inspect the response

‎methods/src/agents/conversations/agents_conversations_create.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010

1111
# Call the agents.conversations.create method
1212
response = client.agents_conversations_create(
13-
name="Fix flaky login test",
14-
origin_channel_id="C123ABC456",
13+
name="Migrate billing cron to Temporal",
14+
session_id="ses_8675309",
15+
origin_channel_id="C0123456789",
1516
origin_message_ts="1717171717.123456",
1617
)
1718

‎methods/src/agents/conversations/agents_conversations_get_canvas.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010

1111
# Call the agents.conversations.getCanvas method
1212
response = client.agents_conversations_getCanvas(
13-
channel="C123ABC456",
14-
canvas_id="F123ABC456",
13+
channel="C9876543210",
14+
canvas_id="F1234567890",
15+
include_resolved=False,
1516
)
1617

1718
# Inspect the response

‎methods/src/agents/conversations/agents_conversations_list_views.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# Call the agents.conversations.listViews method
1212
response = client.agents_conversations_listViews(
13-
channel_id="C123ABC456",
13+
channel_id="C9876543210",
1414
)
1515

1616
# Inspect the response

‎methods/src/agents/conversations/agents_conversations_remove_view.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
# Call the agents.conversations.removeView method
1212
response = client.agents_conversations_removeView(
13-
channel_id="C123ABC456",
14-
view_id="V123ABC456",
13+
channel_id="C9876543210",
14+
view_key="reports/coverage.html",
1515
)
1616

1717
# Inspect the response

‎methods/src/agents/conversations/agents_conversations_set_canvas_content.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
# Call the agents.conversations.setCanvasContent method
1212
response = client.agents_conversations_setCanvasContent(
13-
channel="C123ABC456",
14-
canvas_id="F123ABC456",
15-
content="# Plan\n\n1. Reproduce the flaky test\n2. Fix the race\n3. Verify",
13+
channel="C9876543210",
14+
canvas_id="F1234567890",
15+
content="# Migration plan\n\n1. Inventory cron jobs\n2. Port billing jobs last\n",
1616
)
1717

1818
# Inspect the response

‎methods/src/agents/conversations/agents_conversations_set_commands.py‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@
1010

1111
# Call the agents.conversations.setCommands method
1212
response = client.agents_conversations_setCommands(
13-
channel_id="C123ABC456",
13+
channel_id="C9876543210",
1414
commands=[
1515
{
16-
"name": "test",
17-
"description": "Run the test suite",
16+
"name": "create-pr",
17+
"description": "Open a pull request for the current branch",
18+
"argument_hint": "[title]",
1819
},
1920
{
20-
"name": "diff",
21-
"description": "Show the current diff",
21+
"name": "run-tests",
22+
"description": "Run the test suite and report back",
2223
},
2324
],
2425
)

‎methods/src/agents/conversations/agents_conversations_set_properties.py‎

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,31 @@
1010

1111
# Call the agents.conversations.setProperties method
1212
response = client.agents_conversations_setProperties(
13-
channel_id="C123ABC456",
13+
channel_id="C9876543210",
1414
code_channel={
1515
"context_bar_items": [
1616
{
1717
"key": "repo",
18-
"label": "acme/billing",
18+
"label": "borant/billing",
1919
"icon": "folder",
20-
"url": "https://github.com/acme/billing",
20+
"url": "https://github.com/borant/billing",
21+
},
22+
{
23+
"key": "branch",
24+
"label": "agent/migrate-cron",
25+
"icon": "branch",
26+
"url": "https://github.com/borant/billing/tree/agent/migrate-cron",
27+
},
28+
{
29+
"key": "pr",
30+
"label": "PR #42 is open",
31+
"icon": "hierarchy",
32+
"url": "https://github.com/borant/billing/pull/42",
33+
},
34+
{
35+
"key": "ci",
36+
"label": "Tests pending",
37+
"icon": "terminal",
2138
},
2239
]
2340
},

‎methods/src/agents/conversations/agents_conversations_set_view.py‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010

1111
# Call the agents.conversations.setView method
1212
response = client.agents_conversations_setView(
13-
channel_id="C123ABC456",
14-
type="diff",
15-
content="diff --git a/cron.py b/cron.py\n--- a/cron.py\n+++ b/cron.py\n@@ ...",
16-
base_branch="main",
17-
head_branch="agent/migrate-cron",
13+
channel_id="C9876543210",
14+
view_key="reports/coverage.html",
15+
name="Coverage",
16+
content="<!doctype html><html><head>…</head><body>…</body></html>",
17+
csp={
18+
"resource_domains": ["https://cdn.jsdelivr.net"],
19+
},
1820
)
1921

2022
# Inspect the response

0 commit comments

Comments
 (0)