const resumeCommand = {
  name: "resume",
  description: "Switch to a different session (interactive selector)",
  usage: "/resume",
  category: "General",
  aliases: ["r"],
  handler: async (_args, _agent, _ctx) => {
    const helpText = [
      "\u{1F4CB} Resume Session",
      "\nType /resume to show the session selector\n"
    ].join("\n");
    return helpText;
  }
};
const searchCommand = {
  name: "search",
  description: "Search messages across all sessions",
  usage: "/search",
  category: "General",
  aliases: ["find"],
  handler: async (_args, _agent, _ctx) => {
    return true;
  }
};
const renameCommand = {
  name: "rename",
  description: "Rename the current session",
  usage: "/rename",
  category: "General",
  handler: async (_args, _agent, _ctx) => {
    return true;
  }
};
const forkCommand = {
  name: "fork",
  description: "Fork a session and create a child session with copied history",
  usage: "/fork",
  category: "General",
  handler: async (_args, agent, ctx) => {
    const parentSessionId = ctx.sessionId;
    if (!parentSessionId) {
      return ["\u274C No active session to fork.", "Start a session first, then run /fork."].join(
        "\n"
      );
    }
    const childSession = await agent.forkSession(parentSessionId);
    const childMetadata = await agent.getSessionMetadata(childSession.id);
    const title = childMetadata?.title ? ` (${childMetadata.title})` : "";
    return [
      "\u{1F374} Session forked",
      `Parent: ${parentSessionId}`,
      `Child: ${childSession.id}${title}`,
      "",
      "Use /resume to switch to the new session."
    ].join("\n");
  }
};
export {
  forkCommand,
  renameCommand,
  resumeCommand,
  searchCommand
};
