Skip to content

Commit

Permalink
Update claude extension (raycast#15705)
Browse files Browse the repository at this point in the history
* Update claude extension

* Update CHANGELOG.md and optimise images

---------

Co-authored-by: raycastbot <[email protected]>
  • Loading branch information
2 people authored and GeniusNirmit committed Dec 18, 2024
1 parent fa997b5 commit dec2b6a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 26 deletions.
4 changes: 4 additions & 0 deletions extensions/claude/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Claude Changelog

## [Update] - 2024-12-09

- Feature: Added copy question actions

## [Update] - 2024-11-05

- Feature: Added new [Claude 3.5 Haiku](https://www.anthropic.com/news/3-5-models-and-computer-use)
Expand Down
3 changes: 2 additions & 1 deletion extensions/claude/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"contributors": [
"alextlopez11",
"FelixII",
"midnite"
"midnite",
"ridemountainpig"
],
"categories": [
"Productivity",
Expand Down
60 changes: 35 additions & 25 deletions extensions/claude/src/views/chat.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ActionPanel, clearSearchBar, Icon, List } from "@raycast/api";
import { Action, ActionPanel, clearSearchBar, Icon, List } from "@raycast/api";
import { v4 as uuidv4 } from "uuid";
import { DestructiveAction, PrimaryAction } from "../actions";
import { CopyActionSection } from "../actions/copy";
Expand Down Expand Up @@ -43,30 +43,40 @@ export const ChatView = ({
onModelChange={onModelChange}
/>
{use.chats.data.length > 0 && (
<ActionPanel.Section title="Restart">
<DestructiveAction
title="Start New Conversation"
icon={Icon.RotateAntiClockwise}
dialog={{
title: "Are you sure you want to start a new conversation?",
primaryButton: "Start New",
}}
onAction={() => {
setConversation({
id: uuidv4(),
chats: [],
model: model,
pinned: false,
updated_at: "",
created_at: new Date().toISOString(),
});
use.chats.clear();
clearSearchBar();
use.chats.setLoading(false);
}}
shortcut={{ modifiers: ["cmd", "shift"], key: "n" }}
/>
</ActionPanel.Section>
<>
<ActionPanel.Section title="Question">
<Action.CopyToClipboard
title="Copy Question"
icon={Icon.CopyClipboard}
content={selectedChat.question}
shortcut={{ modifiers: ["cmd"], key: "c" }}
/>
</ActionPanel.Section>
<ActionPanel.Section title="Restart">
<DestructiveAction
title="Start New Conversation"
icon={Icon.RotateAntiClockwise}
dialog={{
title: "Are you sure you want to start a new conversation?",
primaryButton: "Start New",
}}
onAction={() => {
setConversation({
id: uuidv4(),
chats: [],
model: model,
pinned: false,
updated_at: "",
created_at: new Date().toISOString(),
});
use.chats.clear();
clearSearchBar();
use.chats.setLoading(false);
}}
shortcut={{ modifiers: ["cmd", "shift"], key: "n" }}
/>
</ActionPanel.Section>
</>
)}
<PreferencesActionSection />
</ActionPanel>
Expand Down

0 comments on commit dec2b6a

Please sign in to comment.