Repository navigation
Shortcuts actions on the Mac and iPhone: send files, open a chat, call a bot - #175
Merged
Merged
Conversation
Open Conversation opens the chat with a bot or group, and Call Agent calls a bot, opening its chat instead when it can't take calls, as on the iPhone. Send to Agent takes files, with or without a message, copied into the conversation as dropped files are, and can open the conversation after sending. Fixes #153
Both apps now offer Send to Agent, Open Chat and Call Agent, with the same names, parameters and Siri phrases. On the iPhone, Send to Agent sends a message, files or both straight to the Hub, as the share sheet does. The message is optional when files are attached, and an Open Chat switch opens the chat afterwards. Open Chat with Agent becomes Open Chat and also opens groups. Its intent type and its parameter keep their names, and a bot keeps its ID, so shortcuts made with it still find it. The actions move from the widgets into the app, which gives Siri the Mac's phrases. The Agent control stays in the widgets. On the Mac, Open Conversation becomes Open Chat, and the Send to Agent switch becomes Open Chat too. Fixes #153
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the same three Shortcuts actions to the Mac and the iPhone for #153: Send to Agent, Open Chat and Call Agent. They have the same names, parameters and Siri phrases in both apps.
Search keywords include "Open Chat with Agent", "Open Conversation" and "Conversation" for Open Chat, and "Send File" for Send to Agent.
Mac (commit 1, with Open Conversation renamed to Open Chat in commit 2)
storeAttachment, now shared by drop, paste and Shortcuts). With no message, the body is "Sent N attachments". Draft text and staged files are left alone. The Open Chat switch brings Noodle forward withcontinueInForegroundafter sending.iPhone (commit 2)
SharedSend, the same path the share extension uses. It works in the background, and the Open Chat switch brings the app forward and opens the chat by its link.AppShortcutsProvidercan give Siri the phrases.BotEntityis now built into both the app and the widgets. The Agent control for Control Center and the Action Button stays in the widgets, unchanged apart from sharingShelf.bot.Decisions:
CallAgentIntentandOpenAgentChatIntent, and Open Chat's parameter is still calledbot. Only the title changed and the parameter's type widened to bots and groups. A bot's ID in the new conversation entity matches itsBotEntityID (hubKey/conversationID). Call Agent is unchanged.Tests:
ShortcutActionTestspasses (5 tests).HubChatsTests.shortcutsOpenAndSendToBotsAndGroups. It failed to compile before the change. After the change it compiles with build-for-testing, but it can't run on this Mac because there is no signing, so CI runs it. The built app's App Intents metadata lists the three actions and their phrases.Fixes #153