// Software 3.0 synthesis prompt
// @appVersion: 2
// @model: mistral-small:24b-instruct-2501-q4_K_M
// @prompt:
// following interface defines a program logic. implement the program in python. its not necessary to implement the interface itself, its for explanation purposes only.
interface DiscussionBoard {
bool sendMessage(int threadId, String message)
void printThreads()
void printMessages(int threadId)
int getActiveThread()
void exitActiveThread()
void sendMessageToActiveThread(String message)
void createNewThread(String message)
void enterThread(int threadId)
// if prompt input equals "exit" then exitActiveThread() else sendMessageToActiveThread(String message)
void promptMessage()
// if prompt input equals "new" then createNewThread(...) else enterThread(...)
void promptThread()
// main loop runs infinitely
void mainLoop(){
if(getActiveThread()){
printMessages(getActiveThread())
promptMessage()
}else{
printThreads()
promptThread(prompt())
}
}
}