feat(assistant): ask Claude from Home, the Library, a studyset and a session

A device setting, off unless the person turns it on (Settings ›
Assistant), shows a field at the foot of Home and a button that unfolds
into one: above Create studyset in the Library (smaller), in the free lane
on the right of a studyset's bottom bar (floating alone from expanded
windows on), and in the card's lower right corner while studying.

A question is handed to Claude, not answered here: the app opens
claude.ai/new with the question written in, followed by what it is about
(the person's learning on the instance, a studyset by name, or the studied
card's front and back as text), cut at 12,000 characters, for the person
to read and send in Claude. A Claude plan can't drive a chat inside
another app, as Anthropic allows no third party to offer sign-in with it;
Claude is to read the studysets through a connector on the instance
instead (next). Nothing leaves the app until the person sends it there.

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:
Tizian 「ティツィアーン」 2026-10-10 11:51:58 +02:00
commit f4baf053b3
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -20,6 +20,7 @@ import 'package:halkyon_learn_flutter/src/feature/about/data/about_gateway.dart'
import 'package:halkyon_learn_flutter/src/feature/about/data/about_repository.dart';
import 'package:halkyon_learn_flutter/src/feature/anki/data/anki_package.dart';
import 'package:halkyon_learn_flutter/src/feature/anki/data/anki_package_reader.dart';
import 'package:halkyon_learn_flutter/src/feature/assistant/data/claude_hand_off.dart';
import 'package:halkyon_learn_flutter/src/feature/auth/data/auth_gateway.dart';
import 'package:halkyon_learn_flutter/src/feature/auth/data/auth_repository.dart';
import 'package:halkyon_learn_flutter/src/feature/card/data/card_deletions.dart';
@ -146,6 +147,7 @@ Dependencies testDependencies({
SyncOnce? syncOnce,
PendingChangesStore? pendingChanges,
OpenPerson? openPerson,
ClaudeHandOff? claude,
}) => Dependencies(
serverName: 'learn.example.org',
auth: AuthRepository(authGateway ?? FakeAuthGateway()),
@ -167,6 +169,7 @@ Dependencies testDependencies({
deviceSettings: deviceSettings,
appVersion: appVersion,
pomodoro: pomodoro ?? FakePomodoroPlatform(),
claude: claude ?? ClaudeHandOff(open: (url) async => true),
openPerson:
openPerson ??
(person) async {