Closed iT-Boyer closed 1 year ago
(cl-defmethod gts-claude-talk-lasttime ((engine gts-claude-engine) text done fail) (with-slots (talkurl auth-key channel) engine (setq turl (format talkurl channel (url-hexify-string text))) (gts-do-request turl :headers `(("Authorization" . ,(format "Bearer %s" auth-key))) :done done :fail fail) )) (cl-defmethod gts-translate ((engine gts-claude-engine) task rendercb) (gts-claude-talk-lasttime engine (oref task text) (lambda () ;; (with-slots (text) task ;; (message "对话内容:%s" (oref task text)) (goto-char (point-min)) (let ((time) (json-object-type 'plist) (json-array-type 'list)) (let ((json-data (json-read))) (setq time (plist-get json-data :ts)) (message "传递时间戳00 :%s " time) (gts-update-raw task (buffer-string)) (message "传递时间戳11 :%s " time) ;; (message " done --:%s " (oref engine talkurl)) ;; (message "fail--:%s" turl) (subscribe-claude-request engine time (lambda () (message "完成开始绘制 -- ") (gts-update-raw task (buffer-string)) (gts-parse (oref engine parser) task) (funcall rendercb) ) )))) (lambda (err) (gts-render-fail task (format "获取令牌密钥时出错,请检查您的网络和代理,或稍后重试\n\n%s" err)))))
在gts-claude-talk-lasttime的闭包回调时,运行到这段代码提示 task 为nil
gts-claude-talk-lasttime
(gts-update-raw task (buffer-string)) (message "传递时间戳11 :%s " time)
希望能帮忙分析下,是否存在语法的问题。
在
gts-claude-talk-lasttime
的闭包回调时,运行到这段代码提示 task 为nil希望能帮忙分析下,是否存在语法的问题。