- 엔티티: ActionEntity/GoalEntity/QuestEntity (목록 제안 + 이름 검색) - 인텐트 6종: 시간 측정 시작/종료, 횟수 추가, 행동 누적값, 목표/다짐 진행률 조회 — 조회 인텐트는 값을 반환해 단축어에서 변수로 활용 가능 - RunActionIntent: 인터랙티브 위젯 버튼용 토글(시간형 시작/종료, 횟수형 +1) - ActionRunner: 실행 로직 공용화 (짧은 기록 무시 규칙 포함) - 모든 인텐트에 프리미엄 게이트, 실행 후 위젯 타임라인 갱신 - IntentHooks: 앱 프로세스에서 Live Activity 갱신 주입 - 시리 대표 문구 4종 (AppShortcutsProvider) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013yKDMhuF39GVYy3FMcGHh7
49 lines
1.5 KiB
Swift
49 lines
1.5 KiB
Swift
//
|
|
// AppShortcuts.swift
|
|
// Haru_Danim
|
|
//
|
|
// 시리에서 바로 부를 수 있는 대표 단축어 문구 (CLAUDE.md §10)
|
|
//
|
|
|
|
import AppIntents
|
|
|
|
struct HaruDanimShortcuts: AppShortcutsProvider {
|
|
static var appShortcuts: [AppShortcut] {
|
|
AppShortcut(
|
|
intent: StartTimeActionIntent(),
|
|
phrases: [
|
|
"\(.applicationName)에서 측정 시작",
|
|
"\(.applicationName) 시간 측정 시작해 줘",
|
|
],
|
|
shortTitle: "측정 시작",
|
|
systemImageName: "play.circle.fill"
|
|
)
|
|
AppShortcut(
|
|
intent: StopTimeActionIntent(),
|
|
phrases: [
|
|
"\(.applicationName)에서 측정 종료",
|
|
"\(.applicationName) 시간 측정 끝내 줘",
|
|
],
|
|
shortTitle: "측정 종료",
|
|
systemImageName: "stop.circle.fill"
|
|
)
|
|
AppShortcut(
|
|
intent: AddCountIntent(),
|
|
phrases: [
|
|
"\(.applicationName)에서 횟수 추가",
|
|
"\(.applicationName)에 기록 추가해 줘",
|
|
],
|
|
shortTitle: "횟수 추가",
|
|
systemImageName: "plus.circle.fill"
|
|
)
|
|
AppShortcut(
|
|
intent: GoalProgressIntent(),
|
|
phrases: [
|
|
"\(.applicationName) 목표 진행률 알려 줘",
|
|
],
|
|
shortTitle: "목표 진행률",
|
|
systemImageName: "flag.checkered"
|
|
)
|
|
}
|
|
}
|