Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

38
LINES

< > BotCompany Repo | #1022788 // Gazelle: Process Input From AI Bar

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (4516L/23K).

1  
!7
2  
3  
cmodule GProcessAIBar > DynPrintLogAndEnabled {
4  
  start {
5  
    dm_onTopInput_q(voidfunc(S input) {
6  
      S channelName = "AI bar " + computerID();
7  
      long msgID = uniqueNow();
8  
      print("Have input: " + input);
9  
      print("Channel: " + channelName + ", msgID: " + msgID);
10  
      
11  
      S crud = dm_gazelle_linesCRUD();
12  
      
13  
      // user
14  
      
15  
      S userName = "user";
16  
      long userID = md5_long(userName);
17  
      O userConcept = dm_call(crud, 'uniqUser, userID);
18  
      dm_call(crud, 'cset, userConcept, name := userName);
19  
  
20  
      // channel
21  
      
22  
      O channel = dm_call(crud, 'uniqChannel, channelName);
23  
      
24  
      // line
25  
      
26  
      O lineConcept = dm_call(crud, 'uniqConcept, +msgID);
27  
      dm_call(crud, 'cset, lineConcept,
28  
        text := input,
29  
        author := userConcept,
30  
        +channel);
31  
        
32  
      S globalID = getString globalID(lineConcept);
33  
      print("Stored line: " + globalID); 
34  
      
35  
      vmBus_send('gazelleActionableLine, globalID);
36  
    });
37  
  }
38  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1022788
Snippet name: Gazelle: Process Input From AI Bar
Eternal ID of this version: #1022788/5
Text MD5: e5074305df1a6b9f1f7e98becf506cf6
Transpilation MD5: a89643dfc1302591baad12d8a02f0a76
Author: stefan
Category: javax / gazelle
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-07 16:40:26
Source code size: 1036 bytes / 38 lines
Pitched / IR pitched: No / No
Views / Downloads: 252 / 685
Version history: 4 change(s)
Referenced in: [show references]