Skip to content

Commit bfecd16

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 7ff0488 commit bfecd16

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

packages/jupyter-ai/jupyter_ai/chat_handlers/clear.py

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

55
from .base import BaseChatHandler, SlashCommandRoutingType
66

7+
78
class ClearChatHandler(BaseChatHandler):
89
"""Clear the chat panel and show the help menu"""
10+
911
id = "clear"
1012
name = "Clear chat messages"
1113
help = "Clear the chat window"
@@ -27,5 +29,5 @@ async def process_message(self, _):
2729

2830
self._chat_history = [tmp_chat_history]
2931
self.reply(tmp_chat_history.body)
30-
31-
break
32+
33+
break

packages/jupyter-ai/jupyter_ai/chat_handlers/export.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ async def process_message(self, message: HumanChatMessage):
3434
markdown_content = "\n\n".join(
3535
self.chat_message_to_markdown(msg) for msg in self._chat_history
3636
)
37-
args = self.parse_args(message)
38-
chat_filename = args.path[0] if (args.path and args.path[0]!="") else "chat_history" # Handles both empty args and double tap <Enter> key
37+
args = self.parse_args(message)
38+
chat_filename = (
39+
args.path[0] if (args.path and args.path[0] != "") else "chat_history"
40+
) # Handles both empty args and double tap <Enter> key
3941
chat_filename = f"{chat_filename}-{datetime.now():%Y-%m-%d-%H-%M}.md"
4042
chat_file = os.path.join(self.root_dir, chat_filename)
4143
with open(chat_file, "w") as chat_history:

0 commit comments

Comments
 (0)