Documentation
¶
Index ¶
- Variables
- func Execute() error
- func LaunchInNewTerminal(worktree, sessionID string) error
- type ClaudeSettings
- type DiscoveredSession
- type Hook
- type HookConfig
- type LiveStatus
- type MatchedLine
- type SearchResult
- type SessionEndInput
- type SessionStartInput
- type SessionStatus
- type TranscriptMessage
- type UpdateCache
- type UpdateChecker
- func (uc *UpdateChecker) CheckAndCache() (*UpdateCache, error)
- func (uc *UpdateChecker) FetchLatestVersion() (string, error)
- func (uc *UpdateChecker) IsNewer(latest, current string) bool
- func (uc *UpdateChecker) IsStale(cache *UpdateCache) bool
- func (uc *UpdateChecker) LoadCache() (*UpdateCache, error)
- func (uc *UpdateChecker) NotifyMessage(latest string) string
- func (uc *UpdateChecker) SaveCache(cache *UpdateCache) error
- func (uc *UpdateChecker) ShouldNotify(cache *UpdateCache) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "dev"
Functions ¶
func LaunchInNewTerminal ¶
LaunchInNewTerminal launches claude in a new terminal window/tab
Types ¶
type ClaudeSettings ¶
type ClaudeSettings struct {
Hooks map[string][]HookConfig `json:"hooks"`
}
type DiscoveredSession ¶
type DiscoveredSession struct {
SessionID string
SessionName string // Claude Code's auto-generated name (slug)
TranscriptPath string
ProjectPath string // The actual project directory
ProjectHash string // The hash used in ~/.claude/projects/
LastModified time.Time
MessageCount int
IsRegistered bool
}
type HookConfig ¶
type LiveStatus ¶
type MatchedLine ¶
type SearchResult ¶
type SessionEndInput ¶
type SessionStartInput ¶
type SessionStatus ¶
type SessionStatus string
const ( SessionStatusActive SessionStatus = "active" // Recently updated (< 30s) SessionStatusIdle SessionStatus = "idle" // Not recently updated (> 30s) SessionStatusWaiting SessionStatus = "waiting" // Last message was from assistant SessionStatusOffline SessionStatus = "offline" // No transcript or very old )
type TranscriptMessage ¶
type UpdateCache ¶ added in v0.2.1
type UpdateCache struct {
LastCheckedAt time.Time `yaml:"last_checked_at"`
LatestVersion string `yaml:"latest_version"`
CheckedOK bool `yaml:"checked_ok"` // API成功ならtrue
NotifiedVersion string `yaml:"notified_version"` // 最後に通知したバージョン
}
UpdateCache はアップデート確認結果のキャッシュ。
type UpdateChecker ¶ added in v0.2.1
type UpdateChecker struct {
CurrentVersion string // 現在のバージョン(例: "v0.2.0")
CachePath string // キャッシュファイルパス
APIURL string // GitHub API URL(テスト用に差し替え可能)
SuccessTTL time.Duration // 成功時キャッシュ TTL(デフォルト 24h)
FailureTTL time.Duration // 失敗時キャッシュ TTL(デフォルト 1h)
}
UpdateChecker はアップデートの確認とキャッシュ管理を行う。
func (*UpdateChecker) CheckAndCache ¶ added in v0.2.1
func (uc *UpdateChecker) CheckAndCache() (*UpdateCache, error)
CheckAndCache は最新バージョンを取得してキャッシュに保存する。 失敗時も既知の LatestVersion を保持する。
func (*UpdateChecker) FetchLatestVersion ¶ added in v0.2.1
func (uc *UpdateChecker) FetchLatestVersion() (string, error)
FetchLatestVersion は APIURL から最新バージョンを取得する。
func (*UpdateChecker) IsNewer ¶ added in v0.2.1
func (uc *UpdateChecker) IsNewer(latest, current string) bool
IsNewer は latest が current より新しいかどうかを判定する。 current が "dev" の場合は false を返す(開発ビルドでは通知しない)。
func (*UpdateChecker) IsStale ¶ added in v0.2.1
func (uc *UpdateChecker) IsStale(cache *UpdateCache) bool
IsStale はキャッシュが期限切れかどうかを判定する。 成功時は SuccessTTL、失敗時は FailureTTL で判定する。
func (*UpdateChecker) LoadCache ¶ added in v0.2.1
func (uc *UpdateChecker) LoadCache() (*UpdateCache, error)
LoadCache はキャッシュファイルを読み込む。ファイルが存在しない場合は空のキャッシュを返す。
func (*UpdateChecker) NotifyMessage ¶ added in v0.2.1
func (uc *UpdateChecker) NotifyMessage(latest string) string
NotifyMessage はアップデート通知メッセージを返す。
func (*UpdateChecker) SaveCache ¶ added in v0.2.1
func (uc *UpdateChecker) SaveCache(cache *UpdateCache) error
SaveCache はキャッシュをファイルに保存する。
func (*UpdateChecker) ShouldNotify ¶ added in v0.2.1
func (uc *UpdateChecker) ShouldNotify(cache *UpdateCache) bool
ShouldNotify はキャッシュの内容に基づいて通知すべきかを判定する。 新しいバージョンが存在し、かつそのバージョンについてまだ通知していない場合に true。
Click to show internal directories.
Click to hide internal directories.