Skip to content

Commit 350da0d

Browse files
committed
update
1 parent 266d8e3 commit 350da0d

7 files changed

Lines changed: 51 additions & 32 deletions

File tree

.claude/skills/call_foundry_agent/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Send a prompt to an Azure Foundry Agent and retrieve the response.
1111

1212
- Required: `prompt` (The input text to send to the agent)
1313
- Optional:
14-
- `--agent-id` (The ID of the agent to call. Defaults to `AZURE_AI_AGENT_ID` env var)
14+
- `--agent-name` (The name of the agent to call. Defaults to `AZURE_AI_AGENT_NAME` env var)
1515
- `--endpoint` (The Azure AI Project Endpoint. Defaults to `AZURE_AI_PROJECT_ENDPOINT` env var)
1616

1717
### Example

.claude/skills/call_foundry_agent/scripts/call_foundry.py

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
import os
33
import sys
44
from dotenv import load_dotenv
5-
from azure.identity import AzureCliCredential
6-
from azure.ai.agents import AgentsClient
5+
from azure.identity import DefaultAzureCredential
6+
from azure.ai.projects import AIProjectClient
77

88
load_dotenv()
99

1010
def main():
1111
parser = argparse.ArgumentParser(description="Call an Azure Foundry Agent.")
1212
parser.add_argument("prompt", help="The prompt to send to the agent.")
1313
parser.add_argument(
14-
"--agent-id",
15-
default=os.environ.get("AZURE_AI_AGENT_ID"),
16-
help="The ID of the agent to call. Defaults to AZURE_AI_AGENT_ID environment variable.",
14+
"--agent-name",
15+
default=os.environ.get("AZURE_AI_AGENT_NAME"),
16+
help="The name of the agent to call. Defaults to AZURE_AI_AGENT_NAME environment variable.",
1717
)
1818
parser.add_argument(
1919
"--endpoint",
@@ -27,32 +27,31 @@ def main():
2727
print("Error: Azure AI Project Endpoint is required. Set AZURE_AI_PROJECT_ENDPOINT env var or use --endpoint.", file=sys.stderr)
2828
sys.exit(1)
2929

30-
if not args.agent_id:
31-
print("Error: Agent ID is required. Set AZURE_AI_AGENT_ID env var or use --agent-id.", file=sys.stderr)
30+
if not args.agent_name:
31+
print("Error: Agent Name is required. Set AZURE_AI_AGENT_NAME env var or use --agent-name.", file=sys.stderr)
3232
sys.exit(1)
3333

3434
try:
35-
credential = AzureCliCredential()
36-
with AgentsClient(endpoint=args.endpoint, credential=credential) as client:
37-
# Create a thread and run the agent, then wait for completion
38-
result = client.create_thread_and_process_run(
39-
agent_id=args.agent_id,
40-
thread={"messages": [{"role": "user", "content": args.prompt}]},
41-
)
42-
43-
if result.status == "failed":
44-
print(f"Run failed: {result.last_error}", file=sys.stderr)
45-
sys.exit(1)
46-
47-
# Get the agent's response
48-
messages = client.messages.list(thread_id=result.thread_id)
49-
for message in messages:
50-
if message.role == "assistant":
51-
for content in message.content:
52-
if hasattr(content, "text"):
53-
print(content.text.value)
35+
project_client = AIProjectClient(
36+
endpoint=args.endpoint,
37+
credential=DefaultAzureCredential(),
38+
)
39+
40+
# Get an existing agent
41+
agent = project_client.agents.get(agent_name=args.agent_name)
42+
43+
openai_client = project_client.get_openai_client()
44+
45+
# Reference the agent to get a response
46+
response = openai_client.responses.create(
47+
input=[{"role": "user", "content": args.prompt}],
48+
extra_body={"agent": {"name": agent.name, "type": "agent_reference"}},
49+
)
50+
51+
print(response.output_text)
52+
5453
except Exception as e:
55-
print(f"An error occurred: {e}", file=sys.stderr)
54+
print(f"Error: {e}", file=sys.stderr)
5655
sys.exit(1)
5756

5857

.claude/skills/teams_notification/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ Send a notification card to a Microsoft Teams channel using an Incoming Webhook.
1919
### Example
2020

2121
```bash
22-
python .claude/skills/teams_notification/scripts/send_teams_notification.py --message "Hello **World**!" --title "Test Message"
22+
.venv/Scripts/python .claude/skills/teams_notification/scripts/send_teams_notification.py --message "Hello **World**!" --title "Test Message"
2323
```

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AZURE_AI_AGENT_ID=""
1+
AZURE_AI_AGENT_NAME=""
22
AZURE_AI_PROJECT_ENDPOINT=""
33

44
TEAMS_WEBHOOK_URL=""
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Print Issue Comment
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
print_comment:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
issues: write
12+
pull-requests: write
13+
steps:
14+
- name: Print the issue comment
15+
run: echo "User commented: ${{ github.event.comment.body }}"
16+
17+
- name: Add 'hello' comment
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
run: gh issue comment ${{ github.event.issue.number }} --body "hello"

github-copilot-features-status/copilot-ide-features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
| Claude Sonnet 4.5 |||||||
77
| Claude Opus 4.5 |||||||
88
| Claude Haiku 4.5 |||||||
9-
| Gemini 2.5 Pro |||||||
9+
| Gemini 3 Flash |||||||
1010
| Gemini 3 Pro |||||||
1111
| GPT-4.1 |||||||
1212
| o4-mini |||||||

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ selenium>=4.14.0
1313
webdriver-manager>=4.0.1
1414
agent-framework-azure-ai
1515
azure-identity
16-
azure-ai-projects
16+
azure-ai-projects>=2.0.0b1

0 commit comments

Comments
 (0)