feat: add progress notification handling and related structures (#282)
* feat: add progress notification handling and related structures also fix some lifetime bugs of tool macro * fix: fmt
This commit is contained in:
parent
893969ac77
commit
8e1490bcd8
1 changed files with 298 additions and 18 deletions
|
|
@ -745,8 +745,9 @@ where
|
|||
let mut extensions = Extensions::new();
|
||||
let mut meta = Meta::new();
|
||||
// avoid clone
|
||||
std::mem::swap(&mut extensions, request.extensions_mut());
|
||||
// swap meta firstly, otherwise progress token will be lost
|
||||
std::mem::swap(&mut meta, request.get_meta_mut());
|
||||
std::mem::swap(&mut extensions, request.extensions_mut());
|
||||
let context = RequestContext {
|
||||
ct: context_ct,
|
||||
id: id.clone(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue