Meeting Report Types connected from Backend to frontend

This commit is contained in:
MikeHughes-BIN
2025-12-16 15:26:15 +01:00
parent 30f73f7bb7
commit 597f4bfca5
4 changed files with 40 additions and 21 deletions
+5 -5
View File
@@ -83,23 +83,23 @@
<div class="checkbox-group"> <div class="checkbox-group">
<label id="checkbox-label" for="checkbox-group">Choose prefered document style:</label> <label id="checkbox-label" for="checkbox-group">Choose prefered document style:</label>
<div class="checkbox-container"> <div class="checkbox-container">
<input type="checkbox" name ="docFormat" id="docFormat" value="Meeting report"> <input type="checkbox" name ="docFormat" id="docFormat" value="followup-report">
<label id="label_format" for="docFormat">Follow-up Report</label> <label id="label_format" for="docFormat">Follow-up Report</label>
</div> </div>
<div class="checkbox-container"> <div class="checkbox-container">
<input type="checkbox" name="docFormat" id="docFormatSummary1" value="Summary with timestamps"> <input type="checkbox" name="docFormat" id="docFormatSummary1" value="agenda">
<label id="label_summary" for="docFormatSummary">Agenda</label> <label id="label_summary" for="docFormatSummary">Agenda</label>
</div> </div>
<div class="checkbox-container"> <div class="checkbox-container">
<input type="checkbox" name="docFormat" id="docFormatSummary2" value="Summary with timestamps"> <input type="checkbox" name="docFormat" id="docFormatSummary2" value="result-protocol">
<label id="label_summary" for="docFormatSummary">Resultprotocol</label> <label id="label_summary" for="docFormatSummary">Resultprotocol</label>
</div> </div>
<div class="checkbox-container"> <div class="checkbox-container">
<input type="checkbox" name="docFormat" id="docFormatSummary3" value="Summary with timestamps"> <input type="checkbox" name="docFormat" id="docFormatSummary3" value="sprint-planning">
<label id="label_summary" for="docFormatSummary">Sprint Planning Note</label> <label id="label_summary" for="docFormatSummary">Sprint Planning Note</label>
</div> </div>
<div class="checkbox-container"> <div class="checkbox-container">
<input type="checkbox" name="docFormat" id="docFormatCustom" value="Summary with timestamps"> <input type="checkbox" name="docFormat" id="docFormatCustom" value="custom">
<select name="ai_type" id="ai_type"> <select name="ai_type" id="ai_type">
<option>nichts</option> <option>nichts</option>
</select> </select>
+10 -1
View File
@@ -28,6 +28,7 @@ function checkBoxes() {
document.getElementById("progressbar").style.visibility = "visible"; document.getElementById("progressbar").style.visibility = "visible";
//assembly of the json for the main //assembly of the json for the main
/*
const selectedStyles = [checkedCounter]; const selectedStyles = [checkedCounter];
var iter = 0; var iter = 0;
checkboxes.forEach(function(checkbox){ checkboxes.forEach(function(checkbox){
@@ -37,6 +38,13 @@ function checkBoxes() {
iter++; iter++;
} }
}); });
*/
function getSelectedDocumentType() {
const checked = document.querySelector('input[name="docFormat"]:checked');
return checked ? checked.value : null;
}
document.getElementById("testy").style.visibility = "visible" document.getElementById("testy").style.visibility = "visible"
document.getElementById("box1").style.backgroundColor = "red"; document.getElementById("box1").style.backgroundColor = "red";
document.getElementById("box2").style.backgroundColor = "red"; document.getElementById("box2").style.backgroundColor = "red";
@@ -57,7 +65,8 @@ function checkBoxes() {
}, },
"document": { "document": {
"module":aiType.value, "module":aiType.value,
"styles": selectedStyles "type": getSelectedDocumentType()
//"styles": selectedStyles
} }
}; };
window.submit.submit(sendingPackage) window.submit.submit(sendingPackage)
+25 -15
View File
@@ -129,11 +129,21 @@ electron.ipcMain.handle('get-module-names', async () => {
electron.ipcMain.on("file_submit", async (event, args) => { electron.ipcMain.on("file_submit", async (event, args) => {
try { try {
let curstep = 0 let curstep = 0
let totalsteps = 3 + args.document.styles.length let totalsteps = 4
if(args.document.styles.length == 0) const TEMPLATE_MAP = {
throw new Error("At least one Document Style needed"); "followup-report": "followup_report.txt",
"agenda": "agenda.txt",
"result-protocol": "result_protocol.txt",
"sprint-planning": "sprint_planning_note.txt",
"custom": "custom_document.txt"
};
const templateFile = TEMPLATE_MAP[args.document.type];
if (!templateFile) {
throw new Error("Unknown document type: " + args.document.type);
}
console.log(args); console.log(args);
let audiopath = "" let audiopath = ""
@@ -182,19 +192,19 @@ electron.ipcMain.on("file_submit", async (event, args) => {
console.log("\n\n Running the LLM module"); console.log("\n\n Running the LLM module");
// TODO implement documentation module // TODO implement documentation module
// This code handles the Text to Document processing module call // This code handles the Text to Document processing module call
for (let i = 0; i < args.document.styles.length; i++) {
console.log(`\n\n Running the LLM for Document Style ${i+1}`); console.log(`\n\n Running the LLM for Document Style ${args.document.type}`);
await mapFunctions.get("module-handler").function(args.document.module, {inputTranscriptPath: transcriptpath, documentTypePath: "./storage/documentType/standard_meeting_report.txt", language: "en"}).then(resp => { await mapFunctions.get("module-handler").function(args.document.module, { inputTranscriptPath: transcriptpath, documentTypePath: "./storage/documentType/" + templateFile, language: "en" }).then(resp => {
console.log(resp); console.log(resp);
transcriptpath = resp transcriptpath = resp
curstep++ curstep++
mainWindow.webContents.send("progress", {curstep:curstep, totalsteps:totalsteps}) mainWindow.webContents.send("progress", { curstep: curstep, totalsteps: totalsteps })
}).catch(err => { }).catch(err => {
mainWindow.webContents.send("error", err) mainWindow.webContents.send("error", err)
return return
}) })
}
// TODO actually implement this functionality // TODO actually implement this functionality
// Module to get the first few lines for each speaker to send to the frontend // Module to get the first few lines for each speaker to send to the frontend