The same questions as splinter --interview, one message per answer; /skip skips one and /cancel stops. The answers go through the shared profile writer (sp_interview_save), so the file is the same as the terminal path. The menu registers /interview next to start and help. interview.c grows count/prompt/hint/save; the CLI uses the same API, so the questions live in one place. The README said seven questions, the array has six; fixed. test_gateway.sh answers all six questions through the fake Bot API and checks the written profile.
24 lines
747 B
C
24 lines
747 B
C
/*
|
|
* splinter -- the first conversation.
|
|
*
|
|
* Copyright (c) 2026 Konrad Lother
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
#ifndef SPLINTER_INTERVIEW_H
|
|
#define SPLINTER_INTERVIEW_H
|
|
|
|
#include "splinter.h"
|
|
|
|
const char *sp_profile_path(const char *session_dir, char *buf, size_t len);
|
|
int sp_profile_exists(const char *session_dir);
|
|
int sp_interview_run(const char *session_dir, struct sp_buf *err);
|
|
|
|
/* The same questions for a front end that is not a terminal (Telegram). */
|
|
size_t sp_interview_count(void);
|
|
const char *sp_interview_prompt(size_t i);
|
|
const char *sp_interview_hint(size_t i);
|
|
int sp_interview_save(const char *session_dir,
|
|
const char *const *answers, size_t n, struct sp_buf *err);
|
|
|
|
#endif /* SPLINTER_INTERVIEW_H */
|