diff --git a/packages/jupyter-ai/jupyter_ai/chat_handlers/base.py b/packages/jupyter-ai/jupyter_ai/chat_handlers/base.py
index ac33cfbe1..b694e0413 100644
--- a/packages/jupyter-ai/jupyter_ai/chat_handlers/base.py
+++ b/packages/jupyter-ai/jupyter_ai/chat_handlers/base.py
@@ -155,7 +155,7 @@ def handle_api_key_exc(self, e: Exception, message: HumanChatMessage):
if hasattr(self.config_manager, "lm_provider"):
provider_name = getattr(self.config_manager.lm_provider, "name", "")
response = f"Oops! There's a problem connecting to {provider_name}. Please update your {provider_name} API key in the chat settings."
- self.reply(response, message, show_edit_settings=True)
+ self.reply(response, message)
async def _default_handle_exc(self, e: Exception, message: HumanChatMessage):
"""
@@ -168,18 +168,12 @@ async def _default_handle_exc(self, e: Exception, message: HumanChatMessage):
)
self.reply(response, message)
- def reply(
- self,
- response: str,
- human_msg: Optional[HumanChatMessage] = None,
- show_edit_settings: Optional[bool] = None,
- ):
+ def reply(self, response: str, human_msg: Optional[HumanChatMessage] = None):
agent_msg = AgentChatMessage(
id=uuid4().hex,
time=time.time(),
body=response,
reply_to=human_msg.id if human_msg else "",
- show_edit_settings=show_edit_settings,
)
for handler in self._root_chat_handlers.values():
diff --git a/packages/jupyter-ai/jupyter_ai/models.py b/packages/jupyter-ai/jupyter_ai/models.py
index 156e65f49..41509a74d 100644
--- a/packages/jupyter-ai/jupyter_ai/models.py
+++ b/packages/jupyter-ai/jupyter_ai/models.py
@@ -36,7 +36,6 @@ class AgentChatMessage(BaseModel):
body: str
# message ID of the HumanChatMessage it is replying to
reply_to: str
- show_edit_settings: Optional[bool]
class HumanChatMessage(BaseModel):
diff --git a/packages/jupyter-ai/src/components/chat-messages.tsx b/packages/jupyter-ai/src/components/chat-messages.tsx
index cc91e242d..850d6a543 100644
--- a/packages/jupyter-ai/src/components/chat-messages.tsx
+++ b/packages/jupyter-ai/src/components/chat-messages.tsx
@@ -1,8 +1,7 @@
import React, { useState, useEffect } from 'react';
-import { Avatar, Box, Button, Typography } from '@mui/material';
+import { Avatar, Box, Typography } from '@mui/material';
import type { SxProps, Theme } from '@mui/material';
-import SettingsIcon from '@mui/icons-material/Settings';
import ReactMarkdown from 'react-markdown';
import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';
@@ -15,7 +14,6 @@ import { Jupyternaut } from '../icons';
type ChatMessagesProps = {
messages: AiService.ChatMessage[];
- openSettingsView: () => void;
};
type ChatMessageHeaderProps = {
@@ -172,17 +170,6 @@ export function ChatMessages(props: ChatMessagesProps): JSX.Element {
>
{message.body}
- {message.type === 'agent' && message.show_edit_settings && (
- }
- size={'large'}
- onClick={props.openSettingsView}
- fullWidth
- >
- Open Settings
-
- )}
))}
diff --git a/packages/jupyter-ai/src/components/chat.tsx b/packages/jupyter-ai/src/components/chat.tsx
index fa0fa340d..ded339c70 100644
--- a/packages/jupyter-ai/src/components/chat.tsx
+++ b/packages/jupyter-ai/src/components/chat.tsx
@@ -146,7 +146,7 @@ function ChatBody({
return (
<>
-
+