Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Move retry logic from infer_type_name to wizard #3224

Closed

Conversation

mehul-m-prajapati
Copy link

@mehul-m-prajapati mehul-m-prajapati commented Dec 18, 2024

Summary:
Move retry logic from infer_type_name to wizard

Issue Reference(s):
Fixes #2671

/claim #2671

Build & Testing:

  • I ran cargo test successfully.
  • I have run ./lint.sh --mode=fix to fix all linting issues raised by ./lint.sh --mode=check.

Checklist:

  • I have added relevant unit & integration tests.
  • I have updated the documentation accordingly.
  • I have performed a self-review of my code.
  • PR follows the naming convention of <type>(<optional scope>): <title>

@github-actions github-actions bot added the type: chore Routine tasks like conversions, reorganization, and maintenance work. label Dec 18, 2024
@mehul-m-prajapati mehul-m-prajapati changed the title refactor: Move retry logic from infer_type_name to wizard fix: Move retry logic from infer_type_name to wizard Dec 18, 2024
@github-actions github-actions bot added the type: fix Iterations on existing features or infrastructure. label Dec 18, 2024
@mehul-m-prajapati mehul-m-prajapati changed the title fix: Move retry logic from infer_type_name to wizard refactor: Move retry logic from infer_type_name to wizard Dec 18, 2024
@mehul-m-prajapati
Copy link
Author

@tusharmath : Can you please review this PR ?

@tapishr
Copy link

tapishr commented Dec 29, 2024

This is a visualization of the code changes in the PR, generated using Vibinex. Nodes are files/functions/objects. Edges denote function calls.

Call Stack Diff

%%{init: { 'theme': 'neutral', 'themeVariables': { 'fontSize': '20px' }, 'flowchart': { 'nodeSpacing': 100, 'rankSpacing': 100 } } }%%
 	flowchart LR
	subgraph jwqy ["crate/core/generator/PREFIX.rs"]
	nebx["suggest_different_names"]

	click nebx href "https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/crate/core/generator/PREFIX.rs#L0" _blank
	end


	subgraph fkax ["src/cli/llm/infer_type_name.rs"]
	oeoq["InferTypeName"]
	class oeoq modified
	click oeoq href "https://github.com/Alokit-Innovations-Test/tailcall/pull/3/files#diff-a43b1793cba82a69c903b44b7135aa05bed936cd836863e682dca3a970c340efR85" _blank
	end
	class fkax modified

	subgraph jlpz ["my_lib/utils.py"]
	zcsh["Reqwest"]

	click zcsh href "https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/my_lib/utils.py#L0" _blank
	ityc["try_from"]

	click ityc href "https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/my_lib/utils.py#L0" _blank
	jpti["error!"]

	click jpti href "https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/my_lib/utils.py#L0" _blank
	end


	subgraph mdhr ["std/error.rs"]
	gnct["map_err"]

	click gnct href "https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/std/error.rs#L0" _blank
	end


	subgraph xzxk ["genai/chat.rs"]
	kiue["exec_chat"]

	click kiue href "https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/genai/chat.rs#L0" _blank
	ldvq["tracing::warn!"]

	click ldvq href "https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/genai/chat.rs#L0" _blank
	end


	subgraph dwgq ["src/cli/llm/wizard.rs"]
	xorw["Wizard"]
	class xorw modified
	click xorw href "https://github.com/Alokit-Innovations-Test/tailcall/pull/3/files#diff-791273bb7c2a8502059c7a5eef8aebb3d28c93967fab82a6b17d6775c357b8f3R20" _blank
	end
	class dwgq modified

	subgraph whwh ["genai/adapter/AdapterConfig.rs"]
	yvao["false"]

	click yvao href "https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/genai/adapter/AdapterConfig.rs#L0" _blank
	end


	subgraph ojjt ["genai/chat/mod.rs"]
	djrt["cmp::min"]

	click djrt href "https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/genai/chat/mod.rs#L0" _blank
	end


	subgraph lcao ["genai/adapter/AdapterKind.rs"]
	ogzv["try_from"]

	click ogzv href "https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/genai/adapter/AdapterKind.rs#L0" _blank
	ftdg["exec_chat"]

	click ftdg href "https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/genai/adapter/AdapterKind.rs#L0" _blank
	end


	subgraph wosk ["derive_setters/Setters.rs"]
	ozzo["status"]

	click ozzo href "https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/derive_setters/Setters.rs#L0" _blank
	end


	subgraph acav ["src/core/worker/error.rs"]
	abgm["CLI"]

	click abgm href "https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/src/core/worker/error.rs#L27" _blank
	end


	subgraph wylb ["src/cli/llm/error.rs"]
	exfx["Error"]
	class exfx modified
	click exfx href "https://github.com/Alokit-Innovations-Test/tailcall/pull/3/files#diff-09e77c1959cc1d3665f0cd241f2e7d43e0646a8302dd4700a068d5530a33f60cR5" _blank
	end
	class wylb modified

	subgraph qmgy ["src/core/blueprint/operators/select.rs"]
	ijai["16"]

	click ijai href "https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/src/core/blueprint/operators/select.rs#L16" _blank
	end


	subgraph cgha ["src/core/blueprint/operators/expr.rs"]
	bceq["39"]

	click bceq href "https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/src/core/blueprint/operators/expr.rs#L39" _blank
	end


	classDef modified stroke:black,fill:yellow
	classDef added stroke:black,fill:#b7e892,color:black
	classDef deleted stroke:black,fill:red
	xorw =="<a target='_blank' href='https://github.com/Alokit-Innovations-Test/tailcall/pull/3/files#diff-791273bb7c2a8502059c7a5eef8aebb3d28c93967fab82a6b17d6775c357b8f3R59'>Line 59</a>" =====>gnct
	oeoq =="<a target='_blank' href='https://github.com/Alokit-Innovations-Test/tailcall/pull/3/files#diff-a43b1793cba82a69c903b44b7135aa05bed936cd836863e682dca3a970c340efR154'>Line 154</a>" =====>jpti
	xorw =="<a target='_blank' href='https://github.com/Alokit-Innovations-Test/tailcall/pull/3/files#diff-791273bb7c2a8502059c7a5eef8aebb3d28c93967fab82a6b17d6775c357b8f3R54'>Line 54</a>" =====>kiue
	xorw =="<a target='_blank' href='https://github.com/Alokit-Innovations-Test/tailcall/pull/3/files#diff-791273bb7c2a8502059c7a5eef8aebb3d28c93967fab82a6b17d6775c357b8f3R71'>Line 71</a>" =====>yvao
	xorw =="<a target='_blank' href='https://github.com/Alokit-Innovations-Test/tailcall/pull/3/files#diff-791273bb7c2a8502059c7a5eef8aebb3d28c93967fab82a6b17d6775c357b8f3L47'>Line 47</a>" =====>ftdg
	xorw =="<a target='_blank' href='https://github.com/Alokit-Innovations-Test/tailcall/pull/3/files#diff-791273bb7c2a8502059c7a5eef8aebb3d28c93967fab82a6b17d6775c357b8f3R68'>Line 68</a>" =====>ozzo
	xorw =="<a target='_blank' href='https://github.com/Alokit-Innovations-Test/tailcall/pull/3/files#diff-791273bb7c2a8502059c7a5eef8aebb3d28c93967fab82a6b17d6775c357b8f3L49'>Line 49</a>" =====>ogzv
	xorw =="<a target='_blank' href='https://github.com/Alokit-Innovations-Test/tailcall/pull/3/files#diff-791273bb7c2a8502059c7a5eef8aebb3d28c93967fab82a6b17d6775c357b8f3R63'>Line 63</a>" =====>ityc
	ijai =="<a target='_blank' href='https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/src/core/blueprint/operators/select.rs#L16'>Line 16</a>" =====>exfx
	bceq =="<a target='_blank' href='https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/src/core/blueprint/operators/expr.rs#L39'>Line 39</a>" =====>exfx
	oeoq =="<a target='_blank' href='https://github.com/Alokit-Innovations-Test/tailcall/pull/3/files#diff-a43b1793cba82a69c903b44b7135aa05bed936cd836863e682dca3a970c340efL162'>Line 162</a>" =====>djrt
	oeoq =="<a target='_blank' href='https://github.com/Alokit-Innovations-Test/tailcall/pull/3/files#diff-a43b1793cba82a69c903b44b7135aa05bed936cd836863e682dca3a970c340efR149'>Line 149</a>" =====>nebx
	abgm =="<a target='_blank' href='https://github.com/Alokit-Innovations-Test/tailcall/blob/e3a6026a0e95e3b68d07e6eb4e487749bf23b625/src/core/worker/error.rs#L57'>Line 57</a>" =====>exfx
	xorw =="<a target='_blank' href='https://github.com/Alokit-Innovations-Test/tailcall/pull/3/files#diff-791273bb7c2a8502059c7a5eef8aebb3d28c93967fab82a6b17d6775c357b8f3R65'>Line 65</a>" =====>zcsh
	oeoq =="<a target='_blank' href='https://github.com/Alokit-Innovations-Test/tailcall/pull/3/files#diff-a43b1793cba82a69c903b44b7135aa05bed936cd836863e682dca3a970c340efL156'>Line 156</a>" =====>ldvq
	linkStyle 8,9,12 stroke-width:1
	linkStyle 0,1,2,3,5,7,13 stroke:green,stroke-width:8
	linkStyle 4,6,10,14 stroke:red,stroke-width:10
	linkStyle 11 stroke:#ffe302,stroke-width:10
Loading

To modify DiffGraph settings, go to your Vibinex settings page.

@mehul-m-prajapati
Copy link
Author

spam message by @tapishr

@mehul-m-prajapati
Copy link
Author

  • Opening another PR because of too much noise here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 Bounty claim type: chore Routine tasks like conversions, reorganization, and maintenance work. type: fix Iterations on existing features or infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor: Move retry logic from infer_type_name to wizard
3 participants