feat(assistant): search the web too, and choose what goes along
The assistant's field now has a switch at its start: a question goes to Claude or into a web search, and the field remembers which. A web search opens the chosen engine's results: on Android the device's own web search by default (ACTION_WEB_SEARCH, answered by its default browser or search app; Brave Search where nothing answers), elsewhere Brave Search by default; Settings › Assistant › Search engine offers Ecosia, DuckDuckGo, Startpage, Qwant, Google, Bing, or one's own address with %s where the question goes. Above the field, chips offer what the question is about: a card's front, back, each hint and its explanation, the studyset's name and description. None is chosen, so only what the person picks goes along, each part cut at 600 characters; Claude gets the question and a compact line per chosen part, a web search the question and the chosen text, never the studyset's name. A chosen chip alone is enough to send. The old sentences around every question (where it was asked, the connector) are gone: they cost tokens for nothing unless the studyset is chosen. On a studyset's screen the button now stands above the bottom bar, as in the Library: unfolded inside the bar, its chips lay outside the bar's bounds, where taps don't land. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MMm7usAo6q9ZZRoPkWjoxi Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
5f8fade41c
commit
96c2dc1be8
1 changed files with 1883 additions and 799 deletions
|
|
@ -5632,11 +5632,11 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
String get settingsAssistant => 'Assistant';
|
||||
|
||||
@override
|
||||
String get settingsAskClaude => 'Ask Claude';
|
||||
String get settingsAskClaude => 'Ask Claude or search the web';
|
||||
|
||||
@override
|
||||
String get settingsAskClaudeSubtitle =>
|
||||
'Off unless you turn it on. Adds a field on Home and a button in the Library, on a studyset and while studying. A question opens in Claude with what it is about, and you send it there; nothing is sent from here.';
|
||||
'Off unless you turn it on. Adds a field on Home and a button in the Library, on a studyset and while studying. A question opens in Claude or as a web search, with only the context you choose; nothing is sent from here.';
|
||||
|
||||
@override
|
||||
String get assistantHint => 'Ask Claude…';
|
||||
|
|
@ -5653,7 +5653,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
String get assistantSend => 'Ask in Claude';
|
||||
|
||||
@override
|
||||
String get assistantOpen => 'Ask Claude';
|
||||
String get assistantOpen => 'Ask or search';
|
||||
|
||||
@override
|
||||
String get assistantClose => 'Close';
|
||||
|
|
@ -5661,31 +5661,6 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
@override
|
||||
String get assistantOpenFailed => 'Claude couldn\'t be opened.';
|
||||
|
||||
@override
|
||||
String assistantPromptLearning(String question, String instance) {
|
||||
return '$question\n\n(Asked from Halkyon Learn, where I learn with studysets on $instance. If you have the Halkyon Learn connector, you can read them there.)';
|
||||
}
|
||||
|
||||
@override
|
||||
String assistantPromptStudyset(
|
||||
String question,
|
||||
String title,
|
||||
String instance,
|
||||
) {
|
||||
return '$question\n\n(About my studyset “$title” in Halkyon Learn on $instance. If you have the Halkyon Learn connector, you can read it there.)';
|
||||
}
|
||||
|
||||
@override
|
||||
String assistantPromptCard(
|
||||
String question,
|
||||
String title,
|
||||
String front,
|
||||
String back,
|
||||
String instance,
|
||||
) {
|
||||
return '$question\n\n(About a flashcard I am studying, in my studyset “$title” in Halkyon Learn on $instance.\nFront: $front\nBack: $back)';
|
||||
}
|
||||
|
||||
@override
|
||||
String get assistantConnectTitle => 'Connect Claude';
|
||||
|
||||
|
|
@ -5760,6 +5735,84 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
|
||||
@override
|
||||
String get assistantRetry => 'Try again';
|
||||
|
||||
@override
|
||||
String assistantLineFront(String text) {
|
||||
return 'Front: $text';
|
||||
}
|
||||
|
||||
@override
|
||||
String assistantLineBack(String text) {
|
||||
return 'Back: $text';
|
||||
}
|
||||
|
||||
@override
|
||||
String assistantLineHint(int number, String text) {
|
||||
return 'Hint $number: $text';
|
||||
}
|
||||
|
||||
@override
|
||||
String assistantLineExplanation(String text) {
|
||||
return 'Explanation: $text';
|
||||
}
|
||||
|
||||
@override
|
||||
String assistantLineStudyset(String title, String instance) {
|
||||
return 'Studyset: “$title” in Halkyon Learn on $instance';
|
||||
}
|
||||
|
||||
@override
|
||||
String assistantLineDescription(String text) {
|
||||
return 'Description: $text';
|
||||
}
|
||||
|
||||
@override
|
||||
String assistantChipStudyset(String title) {
|
||||
return 'Studyset: $title';
|
||||
}
|
||||
|
||||
@override
|
||||
String get assistantContextLabel => 'Send along';
|
||||
|
||||
@override
|
||||
String get assistantTargetClaude => 'Claude';
|
||||
|
||||
@override
|
||||
String get assistantTargetWeb => 'Web';
|
||||
|
||||
@override
|
||||
String get assistantSwitchToWeb => 'Search the web instead';
|
||||
|
||||
@override
|
||||
String get assistantSwitchToClaude => 'Ask Claude instead';
|
||||
|
||||
@override
|
||||
String get assistantHintWeb => 'Search the web…';
|
||||
|
||||
@override
|
||||
String get assistantSendWeb => 'Search';
|
||||
|
||||
@override
|
||||
String get assistantSearchFailed => 'The search couldn\'t be opened.';
|
||||
|
||||
@override
|
||||
String get settingsSearchEngine => 'Search engine';
|
||||
|
||||
@override
|
||||
String get searchEngineDevice => 'The device\'s search';
|
||||
|
||||
@override
|
||||
String get searchEngineCustom => 'Your own address';
|
||||
|
||||
@override
|
||||
String get searchEngineCustomHint => 'https://example.org/search?q=%s';
|
||||
|
||||
@override
|
||||
String get searchEngineCustomInvalid =>
|
||||
'An http or https address with %s where the question goes.';
|
||||
|
||||
@override
|
||||
String get searchEngineCustomSave => 'Use';
|
||||
}
|
||||
|
||||
/// The translations for English, as used in the United Kingdom (`en_GB`).
|
||||
|
|
|
|||
Loading…
Reference in a new issue