Skip to content

Commit 6aebb36

Browse files
committed
format
1 parent c18fc38 commit 6aebb36

3 files changed

Lines changed: 19 additions & 12 deletions

File tree

main.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
"""
2-
Todo MCP Server with FastAPI and Azure AI Agents - Simplified and Working
2+
To-do MCP Server with FastAPI and Azure AI Agents - Simplified and Working
33
"""
44
import os
5-
import sys
65
import logging
76
import traceback
87
from datetime import datetime
9-
from typing import Dict, List, Option # Default instructions for MCP-enabled agent
10-
instructions = """
11-
You are a helpful agent with access to to-do management tools via MCP.
12-
You can help users create, list, update, and delete to-do items using the available MCP tools.
13-
When users ask about to-dos, use the MCP tools to perform the requested actions.
14-
Always be helpful and provide clear feedback about what actions you've taken.
15-
"""
8+
from typing import Dict, Optional
169
from contextlib import asynccontextmanager
1710

1811
from fastapi import FastAPI, HTTPException, Request
@@ -34,7 +27,7 @@
3427
try:
3528
from azure.identity import DefaultAzureCredential
3629
from azure.ai.agents import AgentsClient
37-
from azure.ai.agents.models import McpTool, RunStatus
30+
from azure.ai.agents.models import McpTool
3831
AZURE_AI_AVAILABLE = True
3932
logger.info("✓ Azure AI packages imported successfully")
4033
except ImportError as e:
@@ -126,7 +119,6 @@ def generate_session_id() -> str:
126119
return str(uuid.uuid4())
127120

128121
class AzureAIAgentService:
129-
"""Simplified Azure AI Agent Service using the working pattern from new-script.py"""
130122

131123
def __init__(self):
132124
self.agents_client = None

static/css/style.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,21 @@ textarea.form-control {
118118

119119
select.form-control {
120120
cursor: pointer;
121+
background-color: white;
122+
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
123+
background-repeat: no-repeat;
124+
background-position: right 8px center;
125+
background-size: 16px;
126+
padding-right: 36px;
127+
appearance: none;
128+
-webkit-appearance: none;
129+
-moz-appearance: none;
130+
}
131+
132+
select.form-control option {
133+
padding: 8px 12px;
134+
background-color: white;
135+
color: #333;
121136
}
122137

123138
/* Buttons */

templates/chat.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h1>App Service MCP To-do List App</h1>
2525
<div class="chat-messages" id="chatMessages">
2626
<div class="message assistant-message">
2727
<div class="message-content">
28-
<strong>agent:</strong> Hi! I'm your AI agent powered by Azure AI Foundry with MCP integration. I can help you manage your to-dos through natural language. Try asking me to "create a new to-do" or "show me all my to-dos"!
28+
<strong>Agent:</strong> Hi! I'm your AI agent powered by Azure AI Foundry with MCP integration. I can help you manage your to-dos through natural language. Try asking me to "create a new to-do" or "show me all my to-dos"!
2929
</div>
3030
<div class="message-time" id="initialTime"></div>
3131
</div>

0 commit comments

Comments
 (0)