Skip to content

Commit c1259ab

Browse files
committed
progress toast updated
1 parent 49ba91a commit c1259ab

File tree

4 files changed

+25
-29
lines changed

4 files changed

+25
-29
lines changed

src/backend/kernel_agents/planner_agent.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
import uuid
44
from typing import Any, Dict, List, Optional, Tuple
55

6-
from azure.ai.projects.models import (ResponseFormatJsonSchema,
7-
ResponseFormatJsonSchemaType)
6+
from azure.ai.projects.models import (
7+
ResponseFormatJsonSchema,
8+
ResponseFormatJsonSchemaType,
9+
)
810
from context.cosmos_memory_kernel import CosmosMemoryContext
911
from event_utils import track_event_if_configured
1012
from kernel_agents.agent_base import BaseAgent
@@ -14,10 +16,17 @@
1416
from kernel_tools.procurement_tools import ProcurementTools
1517
from kernel_tools.product_tools import ProductTools
1618
from kernel_tools.tech_support_tools import TechSupportTools
17-
from models.messages_kernel import (AgentMessage, AgentType,
18-
HumanFeedbackStatus, InputTask, Plan,
19-
PlannerResponsePlan, PlanStatus, Step,
20-
StepStatus)
19+
from models.messages_kernel import (
20+
AgentMessage,
21+
AgentType,
22+
HumanFeedbackStatus,
23+
InputTask,
24+
Plan,
25+
PlannerResponsePlan,
26+
PlanStatus,
27+
Step,
28+
StepStatus,
29+
)
2130
from semantic_kernel.functions import KernelFunction
2231
from semantic_kernel.functions.kernel_arguments import KernelArguments
2332

@@ -188,7 +197,7 @@ async def handle_input_task(self, input_task: InputTask) -> str:
188197
session_id=input_task.session_id,
189198
user_id=self._user_id,
190199
plan_id=plan.id,
191-
content=f"Generated a plan with {len(steps)} steps. Click the blue check box beside each step to complete it, click the x to remove this step.",
200+
content=f"Generated a plan with {len(steps)} steps. Click the check box beside each step to complete it, click the x to reject this step.",
192201
source=AgentType.PLANNER.value,
193202
step_id="",
194203
)
@@ -200,7 +209,7 @@ async def handle_input_task(self, input_task: InputTask) -> str:
200209
"session_id": input_task.session_id,
201210
"user_id": self._user_id,
202211
"plan_id": plan.id,
203-
"content": f"Generated a plan with {len(steps)} steps. Click the blue check box beside each step to complete it, click the x to remove this step.",
212+
"content": f"Generated a plan with {len(steps)} steps. Click the check box beside each step to complete it, click the x to reject this step.",
204213
"source": AgentType.PLANNER.value,
205214
},
206215
)

src/frontend_react/src/components/content/HomeInput.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const HomeInput: React.FC<HomeInputProps> = ({
4545
const handleSubmit = async () => {
4646
if (input.trim()) {
4747
setSubmitting(true);
48-
showToast("Creating a task...", "info", { dismissible: false });
48+
showToast("Creating a task...", "progress", { dismissible: false });
4949
try {
5050
const response = await TaskService.submitInputTask(input.trim());
5151

@@ -89,9 +89,7 @@ const HomeInput: React.FC<HomeInputProps> = ({
8989
}
9090
}, [input]);
9191

92-
const handleClick = () => {
93-
showToast("Creating a task plan...", "error", { dismissible: true });
94-
};
92+
9593

9694
return (
9795
<div className="home-input-container">
@@ -103,7 +101,7 @@ const HomeInput: React.FC<HomeInputProps> = ({
103101

104102
<ChatInput
105103
value={input}
106-
placeholder="Describe what you'd like to do or use / to reference files, people, and more"
104+
placeholder="Tell us what needs planning, building, or connecting—we'll handle the rest."
107105
onChange={setInput}
108106
disabledChat={submitting}
109107
>
@@ -114,11 +112,7 @@ const HomeInput: React.FC<HomeInputProps> = ({
114112
disabled={submitting}
115113
icon={<Send20Regular />}
116114
/>
117-
<Button
118-
appearance="subtle"
119-
icon={<FoodToast20Regular />}
120-
onClick={handleClick}
121-
></Button>
115+
122116
</ChatInput>
123117

124118
{/* Inline Toaster lives right under chat input */}

src/frontend_react/src/components/content/PlanPanelLeft.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,7 @@ const PlanPanelLeft: React.FC<PlanPanelLefProps> = ({ onNewTaskButton }) => {
9898
<div style={{ flexShrink: 0, display: "flex", overflow: "hidden" }}>
9999
<PanelLeft panelWidth={280} panelResize={true}>
100100
<PanelLeftToolbar panelTitle="Microsoft" panelIcon={<MsftColor />}>
101-
<Tooltip content="New task">
102-
<Button
103-
icon={<Add20Regular />}
104-
onClick={onNewTaskButton}
105-
disabled={plansLoading}
106-
appearance="transparent"
107-
/>
108-
</Tooltip>
101+
<Tooltip content="New task" relationship={"label"} />
109102
</PanelLeftToolbar>
110103

111104
<br />

src/frontend_react/src/pages/PlanPage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const PlanPage: React.FC = () => {
8787
const handleOnchatSubmit = useCallback(
8888
async (chatInput: string) => {
8989
if (!planData?.plan) return;
90-
showToast("Submitting clarification...", "info", { dismissible: false });
90+
showToast("Submitting clarification...", "progress", { dismissible: false });
9191
try {
9292
await PlanDataService.submitClarification(
9393
planData.plan.id, // plan_id
@@ -105,7 +105,7 @@ const PlanPage: React.FC = () => {
105105
// Move handlers here to fix dependency order
106106
const handleApproveStep = useCallback(async (step: Step) => {
107107
setProcessingSubtaskId(step.id);
108-
showToast("Submitting approval...", "info", { dismissible: false });
108+
showToast("Submitting approval...", "progress", { dismissible: false });
109109
try {
110110
await PlanDataService.approveStep(step);
111111
await loadPlanData2();
@@ -118,7 +118,7 @@ const PlanPage: React.FC = () => {
118118

119119
const handleRejectStep = useCallback(async (step: Step) => {
120120
setProcessingSubtaskId(step.id);
121-
showToast("Submitting rejection...", "info", { dismissible: false });
121+
showToast("Submitting rejection...", "progress", { dismissible: false });
122122
try {
123123
await PlanDataService.rejectStep(step);
124124
await loadPlanData2();

0 commit comments

Comments
 (0)