@@ -17,6 +17,7 @@ import (
1717 "github.com/charmbracelet/colorprofile"
1818 "github.com/charmbracelet/crush/internal/config"
1919 "github.com/charmbracelet/crush/internal/db"
20+ "github.com/charmbracelet/crush/internal/event"
2021 "github.com/charmbracelet/crush/internal/message"
2122 "github.com/charmbracelet/crush/internal/session"
2223 "github.com/charmbracelet/crush/internal/ui/chat"
@@ -126,6 +127,9 @@ func sessionSetup(cmd *cobra.Command) (context.Context, *sessionServices, func()
126127}
127128
128129func runSessionList(cmd *cobra.Command, _ []string) error {
130+ event.SetNonInteractive(true)
131+ event.SessionListed(sessionListJSON)
132+
129133 ctx, svc, cleanup, err := sessionSetup(cmd)
130134 if err != nil {
131135 return err
@@ -249,6 +253,9 @@ func resolveSessionID(ctx context.Context, svc session.Service, id string) (sess
249253}
250254
251255func runSessionShow(cmd *cobra.Command, args []string) error {
256+ event.SetNonInteractive(true)
257+ event.SessionShown(sessionShowJSON)
258+
252259 ctx, svc, cleanup, err := sessionSetup(cmd)
253260 if err != nil {
254261 return err
@@ -273,6 +280,9 @@ func runSessionShow(cmd *cobra.Command, args []string) error {
273280}
274281
275282func runSessionDelete(cmd *cobra.Command, args []string) error {
283+ event.SetNonInteractive(true)
284+ event.SessionDeletedCommand(sessionDeleteJSON)
285+
276286 ctx, svc, cleanup, err := sessionSetup(cmd)
277287 if err != nil {
278288 return err
@@ -305,6 +315,9 @@ func runSessionDelete(cmd *cobra.Command, args []string) error {
305315}
306316
307317func runSessionRename(cmd *cobra.Command, args []string) error {
318+ event.SetNonInteractive(true)
319+ event.SessionRenamed(sessionRenameJSON)
320+
308321 ctx, svc, cleanup, err := sessionSetup(cmd)
309322 if err != nil {
310323 return err
@@ -338,6 +351,9 @@ func runSessionRename(cmd *cobra.Command, args []string) error {
338351}
339352
340353func runSessionLast(cmd *cobra.Command, _ []string) error {
354+ event.SetNonInteractive(true)
355+ event.SessionLastShown(sessionLastJSON)
356+
341357 ctx, svc, cleanup, err := sessionSetup(cmd)
342358 if err != nil {
343359 return err