Skip to content

Commit

Permalink
added server and UI for configuring user-defined prompts. issue #2395
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Aug 8, 2024
1 parent 8fbb8fc commit 28e7d95
Show file tree
Hide file tree
Showing 21 changed files with 4,426 additions and 13 deletions.
3 changes: 2 additions & 1 deletion build-fast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ function check_error {
}

# export JAVA_HOME=/home/jens/bin/jdk-17.0.9-full/
export JAVA_HOME=/home/jens/bin/jdk1.8.0_131
# export JAVA_HOME=/home/jens/bin/jdk1.8.0_131
export JAVA_HOME=/home/jens/bin/jdk-11.0.9.1-full/

# there is an OpenJDK bug on Ubuntu, causing Surefire tests to fail - skip tests for now
mvn -f j-lawyer-cloud/pom.xml install -DskipTests
Expand Down
Binary file modified j-lawyer-client/lib/j-lawyer-cloud/j-lawyer-cloud.jar
Binary file not shown.
31 changes: 26 additions & 5 deletions j-lawyer-client/src/com/jdimension/jlawyer/client/JKanzleiGUI.form
Original file line number Diff line number Diff line change
Expand Up @@ -740,17 +740,38 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="mnuMailboxSettingsActionPerformed"/>
</Events>
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="mnuAssistantConfigs">
<Menu class="javax.swing.JMenu" name="mnuAssistants">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons16/material/j-lawyer-ai.png"/>
</Property>
<Property name="text" type="java.lang.String" value="Assistent Ingo"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="mnuAssistantConfigsActionPerformed"/>
</Events>
</MenuItem>
<SubComponents>
<MenuItem class="javax.swing.JMenuItem" name="mnuAssistantConfigs">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons16/material/j-lawyer-ai.png"/>
</Property>
<Property name="text" type="java.lang.String" value="Ingo-Server"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="mnuAssistantConfigsActionPerformed"/>
</Events>
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="mnuAssistantPrompts">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons16/material/j-lawyer-ai.png"/>
</Property>
<Property name="text" type="java.lang.String" value="eigene Prompts"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="mnuAssistantPromptsActionPerformed"/>
</Events>
</MenuItem>
</SubComponents>
</Menu>
<MenuItem class="javax.swing.JMenuItem" name="mnuVoipSoftphoneSettings">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
Expand Down
30 changes: 28 additions & 2 deletions j-lawyer-client/src/com/jdimension/jlawyer/client/JKanzleiGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,9 @@ private void initComponents() {
mnuProfileInfo = new javax.swing.JMenuItem();
jSeparator4 = new javax.swing.JPopupMenu.Separator();
mnuMailboxSettings = new javax.swing.JMenuItem();
mnuAssistants = new javax.swing.JMenu();
mnuAssistantConfigs = new javax.swing.JMenuItem();
mnuAssistantPrompts = new javax.swing.JMenuItem();
mnuVoipSoftphoneSettings = new javax.swing.JMenuItem();
mnuBeaSettings = new javax.swing.JMenuItem();
mnuDrebisSettings = new javax.swing.JMenuItem();
Expand Down Expand Up @@ -1877,14 +1879,28 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
});
mnuOptions.add(mnuMailboxSettings);

mnuAssistants.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons16/material/j-lawyer-ai.png"))); // NOI18N
mnuAssistants.setText("Assistent Ingo");

mnuAssistantConfigs.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons16/material/j-lawyer-ai.png"))); // NOI18N
mnuAssistantConfigs.setText("Assistent Ingo");
mnuAssistantConfigs.setText("Ingo-Server");
mnuAssistantConfigs.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
mnuAssistantConfigsActionPerformed(evt);
}
});
mnuOptions.add(mnuAssistantConfigs);
mnuAssistants.add(mnuAssistantConfigs);

mnuAssistantPrompts.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons16/material/j-lawyer-ai.png"))); // NOI18N
mnuAssistantPrompts.setText("eigene Prompts");
mnuAssistantPrompts.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
mnuAssistantPromptsActionPerformed(evt);
}
});
mnuAssistants.add(mnuAssistantPrompts);

mnuOptions.add(mnuAssistants);

mnuVoipSoftphoneSettings.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons16/sipphone.png"))); // NOI18N
mnuVoipSoftphoneSettings.setText("Telefonie per Softphone");
Expand Down Expand Up @@ -2839,6 +2855,14 @@ private void mnuAssistantConfigsActionPerformed(java.awt.event.ActionEvent evt)
}
}//GEN-LAST:event_mnuAssistantConfigsActionPerformed

private void mnuAssistantPromptsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuAssistantPromptsActionPerformed
if (checkAdmin()) {
AssistantPromptSetupDialog dlg = new AssistantPromptSetupDialog(this, true);
FrameUtils.centerDialog(dlg, this);
dlg.setVisible(true);
}
}//GEN-LAST:event_mnuAssistantPromptsActionPerformed

/**
* @param args the command line arguments
*/
Expand Down Expand Up @@ -2891,6 +2915,8 @@ public static void main(String args[]) {
private javax.swing.JMenuItem mnuArchiveFileOptionsSubjectFields;
private javax.swing.JMenuItem mnuArchiveFileTags;
private javax.swing.JMenuItem mnuAssistantConfigs;
private javax.swing.JMenuItem mnuAssistantPrompts;
private javax.swing.JMenu mnuAssistants;
private javax.swing.JMenuItem mnuBackupConfiguration;
private javax.swing.JMenuItem mnuBankImport;
private javax.swing.JMenuItem mnuBeaCourtAddressImport;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,6 @@
package com.jdimension.jlawyer.client.configuration;

import com.jdimension.jlawyer.persistence.AssistantConfig;
import com.jdimension.jlawyer.persistence.IntegrationHook;
import java.awt.Color;
import java.awt.Component;
import javax.swing.JLabel;
Expand Down
Loading

0 comments on commit 28e7d95

Please sign in to comment.