Code: Select all | Expand
#include "FiveWin.ch"
REQUEST DBFCDX
function Main()
local aFiles := Directory( "c:\fwh\source\classes\*.prg" )
local oChat := TDeepSeek():New(), aFile
local cPrompt := "document this code, explaining what this Class is about," + ;
" listing all the DATAs and METHODs," + ;
" and providing a brief description of each of them. Code:"
DbCreate( "classes.dbf", { { "name", "C", 15, 0 }, { "docs", "M", 10, 0 } }, "DBFCDX" )
USE classes
for each aFile in aFiles
MsgRun( "documenting " + aFile[ 1 ],;
"please wait...", { || oChat:Send( cPrompt + ;
hb_memoRead( "c:\fwh\source\classes\" + aFile[ 1 ] ) ) } )
DbAppend()
classes->name := aFile[ 1 ]
classes->docs := oChat:GetValue()
next
GO TOP
XBrowse()
return nil