<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Wing Tips</title><link>https://wingware.com/</link><description>Tips, tricks, and helpful hints for Wingware's Python IDEs</description><lastBuildDate>Tue, 03 Nov 2026 13:07:45 GMT</lastBuildDate><generator>PyRSS2Gen-1.0.0</generator><docs>http://www.dalkescientific.com/Python/PyRSS2Gen.html</docs><item><title>Unit Testing with the AI Agent in Wing Pro 12</title><link>https://wingware.com/hints/unit-testing-ai</link><description>&lt;p&gt;This &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tip&lt;/a&gt; covers unit testing with
&lt;a class="reference" href="https://wingware.com/download/wingpro"&gt;Wing Pro&lt;/a&gt; 12's AI agent
integration.  For the manual workflow -- identifying test files,
running and debugging tests yourself, collecting code coverage -- see the
parallel &lt;a class="reference" href="/hints/unit-testing"&gt;Unit Testing Wing Tip&lt;/a&gt;.&lt;/p&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Setting the Testing Regimen&lt;/h3&gt;
&lt;p&gt;By default, Wing asks the agent to write unit tests for new code and to
run those tests successfully before considering its task complete.  As
long as your code base already has tests, it will do that.  If your code
base has no existing tests, you may need to nudge it a bit to get it started.&lt;/p&gt;
&lt;p&gt;To override this default, set &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt; &lt;span class="pre"&gt;Regimen&lt;/span&gt;&lt;/tt&gt; on the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Agent&lt;/span&gt;&lt;/tt&gt; tab of
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Project&lt;/span&gt; &lt;span class="pre"&gt;Properties&lt;/span&gt;&lt;/tt&gt;. Wing compiles your choice into the development
guides in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;.wing&lt;/span&gt;&lt;/tt&gt; directory, which every agent reads, so each new
agent session already knows what you expect.&lt;/p&gt;
&lt;p&gt;The regimens trade thoroughness for speed:&lt;/p&gt;
&lt;div class="bullet-list"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="bullet"&gt;&lt;strong&gt;None&lt;/strong&gt; -- The agent never writes or runs tests on its own.  Use this
if testing is a separate QA or release step.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;&lt;strong&gt;Minimal&lt;/strong&gt; (the default) -- Writes tests for new code and runs those new tests
before considering the task finished.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;&lt;strong&gt;Balanced&lt;/strong&gt; -- Minimal, plus before review or commit it re-runs any &lt;em&gt;stale&lt;/em&gt;
tests in the directories you changed.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;&lt;strong&gt;Thorough&lt;/strong&gt; -- Also runs new and stale tests at task end, and before
review or commit it runs every stale test in the project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;&lt;strong&gt;Obsessive&lt;/strong&gt; -- Runs every test in the directories you changed at task
end, and the full suite before review or commit.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;&lt;strong&gt;Custom&lt;/strong&gt; -- Configure each of the detailed testing regimen axes on its own
(when to write tests, what to run before task completion, what to run before
review, and what to run before commiting without review)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;p&gt;A test is &amp;quot;stale&amp;quot; when Wing's code-coverage data shows your change touched
code that the test depends on.  Wing monitors code coverage automatically while
the agent runs tests, so the stale-test regimens work without a separate
&amp;quot;run everything first&amp;quot; step.  Stale detection is a fast heuristic, not a
guarantee -- it can miss tests that haven't run recently or that exercise
hard-to-trace code -- so whatever regimen you use day to day, plan to run
the full suite before a release or a merge to a long-lived branch.&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/unit-testing-ai/testing-regimen.png" alt="Testing Regimen setting in Project Properties" backrefs="" caption="Shown above:  The Testing Regimen options on the AI Agent tab of Project Properties, which tell the agent how much to write and run tests on every task." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" width="891px" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  The Testing Regimen options on the AI Agent tab of Project Properties, which tell the agent how much to write and run tests on every task.&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Iterating on Failures&lt;/h3&gt;
&lt;p&gt;Once a regimen is set, testing is the agent's job, not yours.  When
a test fails, the agent reads the failure, refines the code, and re-runs
-- and it won't consider a task done until the tests it was asked to run
pass.&lt;/p&gt;
&lt;p&gt;You generally don't need to step in.  If the agent hits something it
can't resolve on its own -- a fundamental problem rather than a quick fix
-- it stops and reports back, or asks how you'd like to proceed, rather
than quietly weakening or skipping a test to force a green run.  You can
watch the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; tool update as it works if you like, but the results
are also part of the task summary you review before accepting.&lt;/p&gt;
&lt;p&gt;For full reference, see the &lt;a class="reference" href="/doc/testing"&gt;Unit Testing documentation&lt;/a&gt;
and &lt;a class="reference" href="https://wingware.com/feature/agent"&gt;Autonomous Development with AI Agents&lt;/a&gt;.&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;&lt;p&gt;That's it for now!  We'll be back soon with more &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tips&lt;/a&gt; for Wing Python IDE.&lt;/p&gt;
&lt;p&gt;As always, please don't hesitate to email &lt;a class="reference" href="mailto:support&amp;#64;wingware.com"&gt;support&amp;#64;wingware.com&lt;/a&gt; if you
run into problems or have any questions.&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">https://wingware.com/hints/unit-testing-ai</guid><pubDate>Fri, 10 Jul 2026 01:00:00 GMT</pubDate></item><item><title>Fixing Code Warnings with the AI Agent in Wing Pro 12</title><link>https://wingware.com/hints/code-warnings-ai</link><description>&lt;p&gt;This &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tip&lt;/a&gt; looks at fixing code
warnings with &lt;a class="reference" href="https://wingware.com/download/wingpro"&gt;Wing Pro&lt;/a&gt; 12's
AI agent integration.  For the manual workflow -- disabling
warnings, configuring scopes, sharing configurations across projects --
see the parallel &lt;a class="reference" href="/hints/code-warnings"&gt;Code Warnings Wing Tip&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Code warnings have always told you &lt;em&gt;what&lt;/em&gt; might be wrong in your code.
With the agent, the next step -- making it right -- is no longer your
problem alone.&lt;/p&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Fix in the Editor&lt;/h3&gt;
&lt;p&gt;When Wing flags a warning in the editor (an undefined name, an unresolved
import, an unused variable, a syntax issue), the warning tooltip now
includes a &lt;tt class="literal"&gt;&lt;span class="pre"&gt;FIX&lt;/span&gt;&lt;/tt&gt; action.  Click &lt;tt class="literal"&gt;&lt;span class="pre"&gt;FIX&lt;/span&gt;&lt;/tt&gt; and the agent receives the
warning text plus the surrounding code as a small, scoped task: fix
&lt;em&gt;this&lt;/em&gt; warning, in &lt;em&gt;this&lt;/em&gt; place.&lt;/p&gt;
&lt;p&gt;Most fixes are mechanical and arrive in seconds: imports get added,
typos get corrected, dead code gets removed.  The change appears in the
task review interface (see the &lt;a class="reference" href="/hints/agent-review"&gt;agent change review Wing Tip&lt;/a&gt;) so you can accept, reject, or refine like any
other agent edit.&lt;/p&gt;
&lt;p&gt;This is the same &lt;tt class="literal"&gt;&lt;span class="pre"&gt;FIX&lt;/span&gt;&lt;/tt&gt; action you'll find on a failing unit test in the
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; tool and on an exception in the debugger -- each hands the
problem, with its context, to the agent in a single click.&lt;/p&gt;
&lt;p&gt;For warnings that don't have an obvious fix -- a possible logic error,
say -- the agent will explain what it's doing and ask before making
changes that could alter behavior.&lt;/p&gt;
&lt;p&gt;If you have external checkers configured (such as Pylint, Ruff, or mypy),
their warnings can also be fixed this way.&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/code-warnings-ai/fix-in-editor.png" alt="FIX action in a warning tooltip" backrefs="" caption="Shown above:  Hovering over a warning indicator in the editor to reveal the FIX action, which sends the warning to the agent for resolution." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" width="881px" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Hovering over a warning indicator in the editor to reveal the FIX action, which sends the warning to the agent for resolution.&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Fix Many at Once&lt;/h3&gt;
&lt;p&gt;To clean up more than one warning in a pass, use &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Fix&lt;/span&gt; &lt;span class="pre"&gt;Code&lt;/span&gt; &lt;span class="pre"&gt;Warnings&lt;/span&gt;&lt;/tt&gt; in
the Code Actions menu at the top right of the editor.  It hands the code
you point it at -- the selection, the enclosing function or class, or the
whole file -- to the agent as a single request: fix the issues that would
cause warnings, such as unused imports, undefined names, type errors, and
style problems, using its judgment about which are real and which are
false positives.&lt;/p&gt;
&lt;p&gt;This works from the agent's own read of the code, not the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Code&lt;/span&gt;
&lt;span class="pre"&gt;Warnings&lt;/span&gt;&lt;/tt&gt; tool, so it doesn't depend on Wing's warnings or any external
checkers being configured.  As with a single fix, the result comes back
through the task review interface for you to accept, reject, or refine.&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/code-warnings-ai/fix-warnings-action.png" alt="Fix Code Warnings in the editor's Code Actions menu" backrefs="" caption="Shown above:  Choosing Fix Code Warnings from the Code Actions menu at the top right of the editor to fix a file's warnings in one pass." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Choosing Fix Code Warnings from the Code Actions menu at the top right of the editor to fix a file's warnings in one pass.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;For full reference on Wing's code warnings system, see the &lt;a class="reference" href="/doc/warnings/warning-types"&gt;Code
Warnings documentation&lt;/a&gt;.  For the agent
integration, see &lt;a class="reference" href="https://wingware.com/feature/agent"&gt;Autonomous Development with AI Agents&lt;/a&gt;.&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;&lt;p&gt;That's it for now!  We'll be back soon with more &lt;a class="reference" href="/hints"&gt;Wing Tips&lt;/a&gt; for Wing Python IDE.&lt;/p&gt;
&lt;p&gt;As always, please don't hesitate to email &lt;a class="reference" href="mailto:support&amp;#64;wingware.com"&gt;support&amp;#64;wingware.com&lt;/a&gt; if you
run into problems or have any questions.&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">https://wingware.com/hints/code-warnings-ai</guid><pubDate>Fri, 10 Jul 2026 01:00:00 GMT</pubDate></item><item><title>Working with Tests and AI Agents in Wing Pro 12</title><link>https://wingware.com/hints/agent-tests</link><description>&lt;p&gt;This &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tip&lt;/a&gt; continues the series on
AI agents in &lt;a class="reference" href="https://wingware.com/download/wingpro"&gt;Wing Pro&lt;/a&gt; 12.  Tests
give the agent concrete feedback on whether a change is correct, and give
you concrete evidence to review even before reading the diff.&lt;/p&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Testing Regimen&lt;/h3&gt;
&lt;p&gt;Wing provides the agent with a variety of capabilities aimed at making its
work more efficient and reducing token consumption. Part of this comes in the
form of MCP (Model Context Protocol) servers that it uses to access Wing
functionality in ways that make it more efficient.&lt;/p&gt;
&lt;p&gt;Another part takes the form of development guides, which Wing writes into
the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;.wing&lt;/span&gt;&lt;/tt&gt; directory when you set up the agent.  These describe the
development methodology to follow, and nudge the agent towards using the
MCP tools in a way that reduces wall time and token use.&lt;/p&gt;
&lt;p&gt;Some of the larger gains seen in our &lt;a class="reference" href="/psupport/wing12/benchmarks/bench-intro.html"&gt;benchmarks&lt;/a&gt;, which were run with Claude
Code, were the result of providing the agent with a unit testing capability
optimized for token use and guidance on how to do testing as it develops code.&lt;/p&gt;
&lt;p&gt;You can control the details of this from the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Agent&lt;/span&gt;&lt;/tt&gt; tab in &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Project&lt;/span&gt;
&lt;span class="pre"&gt;Properties&lt;/span&gt;&lt;/tt&gt;. By default -- the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Minimal&lt;/span&gt;&lt;/tt&gt; regimen -- Wing asks the agent to
write tests for new code and run those new tests before considering a task
complete.&lt;/p&gt;
&lt;p&gt;You can also request other unit testing modes, each of which varies
guidance on when to write tests and when to run them.&lt;/p&gt;
&lt;p&gt;Note that if you change the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt; &lt;span class="pre"&gt;Regimen&lt;/span&gt;&lt;/tt&gt; or its individual
parameters, that change will only apply to new agent sessions and
not any sessions that are already running.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Running Tests via Wing's Testing Tool&lt;/h3&gt;
&lt;p&gt;The agent uses the same &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; tool you'd use yourself, configured
through the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; tab in &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Project&lt;/span&gt; &lt;span class="pre"&gt;Properties&lt;/span&gt;&lt;/tt&gt; (see the &lt;a class="reference" href="/hints/unit-testing"&gt;Unit
Testing Wing Tip&lt;/a&gt;).  This means:&lt;/p&gt;
&lt;div class="bullet-list"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="bullet"&gt;The agent picks up your project's test file configuration&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;Failures appear in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; tool with the same drill-down as
manual runs.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;Code coverage data is available to both you and the agent&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;p&gt;Results update in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; tool as they come in, so you can
watch a long suite progress without interrupting the agent.&lt;/p&gt;
&lt;p&gt;You don't have to spell all of this out in a prompt every time.  The
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Write&lt;/span&gt; &lt;span class="pre"&gt;Tests&lt;/span&gt;&lt;/tt&gt; item in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; menu and editor context menu hands
selected code to the agent to write tests for, and when a test fails the
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; tool offers a one-click &lt;tt class="literal"&gt;&lt;span class="pre"&gt;FIX&lt;/span&gt;&lt;/tt&gt; that sends the failure straight
to the agent to diagnose and resolve.&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/agent-tests/testing-tool-during-agent-run.png" alt="Testing tool while the agent is running tests" backrefs="" caption="Shown above:  Watching the Testing tool update in real time while the agent runs the test suite as part of an in-progress task." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" width="827px" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Watching the Testing tool update in real time while the agent runs the test suite as part of an in-progress task.&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Code Coverage&lt;/h3&gt;
&lt;p&gt;When an agent uses Wing's unit testing MCP server, it always runs tests
with code coverage enabled.  This allows it to run just stale tests after
making code changes, which can save a lot of time and token usage.&lt;/p&gt;
&lt;p&gt;A few things to understand about code coverage:&lt;/p&gt;
&lt;div class="bullet-list"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="bullet"&gt;Code coverage does not mean that code is correct; that depends on whether
the unit tests are correct and passing.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;Code coverage is not infallible, but it's a great heuristic for
reducing development time and token use.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;p&gt;You should still run all your unit tests before releasing your code to
production. There is no absolute guarantee that every necessary test run has
taken place, if you are relying entirely on code coverage to decide which
tests to run.&lt;/p&gt;
&lt;p&gt;Tests matter even more when agents work autonomously with the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;
&lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt;: without them, workers can't tell whether their code functions
correctly, and the work stops often to ask you. See the &lt;a class="reference" href="/hints/agent-autonomous"&gt;Wing Tip on
autonomous development&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Further Reading&lt;/h3&gt;
&lt;p&gt;Wing's AI agent integration has a lot of features, but you don't need to
understand all of them to get started. When in doubt, ask the agent!&lt;/p&gt;
&lt;p&gt;See also &lt;a class="reference" href="https://wingware.com/feature/agent"&gt;Autonomous Development with AI Agents&lt;/a&gt;
and &lt;a class="reference" href="https://wingware.com/doc/aiagents"&gt;AI Agent-Assisted Development&lt;/a&gt; in
Wing's documentation.&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;&lt;p&gt;That's it for now!  The next Wing Tip wraps up this series with best
practices for getting reliable results.&lt;/p&gt;
&lt;p&gt;As always, please don't hesitate to email &lt;a class="reference" href="mailto:support&amp;#64;wingware.com"&gt;support&amp;#64;wingware.com&lt;/a&gt; if you run
into problems or have any questions.&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">https://wingware.com/hints/agent-tests</guid><pubDate>Fri, 10 Jul 2026 01:00:00 GMT</pubDate></item><item><title>Using the Tasks Tool with AI Agents in Wing Pro 12</title><link>https://wingware.com/hints/agent-tasks-tool</link><description>&lt;p&gt;This &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tip&lt;/a&gt; takes a look at the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt;
tool in &lt;a class="reference" href="https://wingware.com/download/wingpro"&gt;Wing Pro&lt;/a&gt; 12, as a way to
work with AI agents.&lt;/p&gt;
&lt;p&gt;There are actually two ways to talk to an agent: (1) by typing directly in
the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Agent&lt;/span&gt;&lt;/tt&gt; tool or (2) through the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt; tool, which runs each
request as a queued unit of work. Both feed the same agent sessions, and
both track tasks through their Plan -&amp;gt; Execute -&amp;gt; Review -&amp;gt; History
lifecycle in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt; tool.&lt;/p&gt;
&lt;p&gt;Using the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt; tool makes sense if you are entering new tasks while all
your agents are busy. It can also be used as a higher-level &amp;quot;To Do&amp;quot; list, by
creating &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Goals&lt;/span&gt;&lt;/tt&gt; and organizing tasks under them. Tasks may start out as a
brief bulleted description, before being fleshed out in preparation to feed
them to the AI agent.&lt;/p&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Entering and Queueing Requests&lt;/h3&gt;
&lt;p&gt;To add a task, open the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt; tool from the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tools&lt;/span&gt;&lt;/tt&gt; menu if it isn't
visible, and use the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;+&lt;/span&gt;&lt;/tt&gt; button on its &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Plan&lt;/span&gt;&lt;/tt&gt; tab, in either the
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Goals&lt;/span&gt;&lt;/tt&gt; or the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt; view.&lt;/p&gt;
&lt;p&gt;A task you type starts as a &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Draft&lt;/span&gt;&lt;/tt&gt;, so nothing runs it while it is half
written.  Click its &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Draft&lt;/span&gt;&lt;/tt&gt; pill to mark it &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Ready&lt;/span&gt;&lt;/tt&gt; when you're done,
which tells the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt; &lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt; (when it is on) that it can queue the
task.  To run a task yourself, queue it from its &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Q&lt;/span&gt;&lt;/tt&gt; menu.  While the
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt; &lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt; is on, the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Q&lt;/span&gt;&lt;/tt&gt; menu is hidden: right-click on the task
and select one of your own queues from its &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Queue&lt;/span&gt;&lt;/tt&gt; submenu instead.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Keeping the Plan Manageable&lt;/h3&gt;
&lt;p&gt;Once your plan holds more goals than you are working on, you can set some
aside.  &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Now&lt;/span&gt;&lt;/tt&gt;, &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Later&lt;/span&gt;&lt;/tt&gt;, and &lt;tt class="literal"&gt;&lt;span class="pre"&gt;All&lt;/span&gt;&lt;/tt&gt;, on the line below the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Goals&lt;/span&gt;&lt;/tt&gt;,
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt;, and &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Incoming&lt;/span&gt;&lt;/tt&gt; views, choose which goals are shown.  To set a
goal aside, click the clock icon in its header.  Its &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Ready&lt;/span&gt;&lt;/tt&gt; tasks become
Drafts, and the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt; &lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt; leaves them alone until you make one
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Ready&lt;/span&gt;&lt;/tt&gt; yourself or bring the goal back.  Clicking the goal's clock again
brings it back to &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Now&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Outline&lt;/span&gt;&lt;/tt&gt; and &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Focus&lt;/span&gt;&lt;/tt&gt;, at the right of the same line, set how goals
open.  In &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Outline&lt;/span&gt;&lt;/tt&gt;, the default, each goal opens and closes on its own.
In &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Focus&lt;/span&gt;&lt;/tt&gt;, opening a goal closes the others, and double-clicking on any
goal focuses on it.  The &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Compact&lt;/span&gt;&lt;/tt&gt; / &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Expanded&lt;/span&gt;&lt;/tt&gt; button above them
switches between showing the whole text of each task and a single line:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/agent-tasks-tool/plan-goals.png" alt="The Goals view in the Plan tab of the Tasks tool" backrefs="" caption="Shown above:  The Goals view in Now and Outline, with one goal open." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" width="640px" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  The Goals view in Now and Outline, with one goal open.&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Running Queued Tasks&lt;/h3&gt;
&lt;p&gt;Once a task is queued, it moves to the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Execute&lt;/span&gt;&lt;/tt&gt; tab of the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt; tool.
If the queue is active and has &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Auto-Advance&lt;/span&gt;&lt;/tt&gt; enabled then it will start
each queued task automatically.  If not, use the play icon on the queue to
start its next task.  To stop a running task early, use its &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Cancel&lt;/span&gt;&lt;/tt&gt;
action.  A task left interrupted offers &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Move&lt;/span&gt; &lt;span class="pre"&gt;to&lt;/span&gt; &lt;span class="pre"&gt;Review&lt;/span&gt;&lt;/tt&gt; to keep what it
has done so far, or &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Reset&lt;/span&gt;&lt;/tt&gt; to return it to the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Plan&lt;/span&gt;&lt;/tt&gt; tab.&lt;/p&gt;
&lt;p&gt;The &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Execute&lt;/span&gt;&lt;/tt&gt; tab has two views.  &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Queues&lt;/span&gt;&lt;/tt&gt; shows your queues at the top
and the selected queue's tasks below.  &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Up&lt;/span&gt; &lt;span class="pre"&gt;Next&lt;/span&gt;&lt;/tt&gt; shows what runs next in
every queue, followed by the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Ready&lt;/span&gt;&lt;/tt&gt; tasks that no queue holds yet, and
points out tasks the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt; &lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt; has just queued.  Click a queue's name
there to show its session in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Agent&lt;/span&gt;&lt;/tt&gt; tool:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/agent-tasks-tool/up-next.png" alt="The Up Next view in the Execute tab of the Tasks tool" backrefs="" caption="Shown above:  Up Next with two queues running, a task the Tasks Manager just queued, and a Ready task that no queue holds yet." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" width="640px" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Up Next with two queues running, a task the Tasks Manager just queued, and a Ready task that no queue holds yet.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;Queueing makes it easy to batch related work and walk away, for example
with a &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Bug&lt;/span&gt; &lt;span class="pre"&gt;Fixes&lt;/span&gt;&lt;/tt&gt; queue for small fixes as you think of them and other
queues for larger work.  Be mindful of agents changing the same code at
once, and ask an agent to keep to specific files or directories when that
helps.  Wing tracks which files each task changes, so you can commit the
work of different queues separately.&lt;/p&gt;
&lt;p&gt;Even when the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt; tool isn't visible, the agent status area at the
right end of the main toolbar shows whether agents are running, how many
queues are waiting for your input, and a button that jumps to changes
ready for review.&lt;/p&gt;
&lt;p&gt;After a task is completed, it transitions to the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Review&lt;/span&gt;&lt;/tt&gt; tab, from which
you can review and accept or reject edits that were made.  That and the
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;History&lt;/span&gt;&lt;/tt&gt; tab are covered in a later Wing Tip.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Letting the Tasks Manager Do the Queueing&lt;/h3&gt;
&lt;p&gt;Once you are running more than a few tasks, deciding which ones can run at
the same time, watching queues, and looking through sessions for questions
becomes work in itself.  The &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt; &lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt; is an agent that can do this
for you.  Turn it on from the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Options&lt;/span&gt;&lt;/tt&gt; menu or the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Turn&lt;/span&gt; &lt;span class="pre"&gt;On&lt;/span&gt;&lt;/tt&gt; button at
the top of the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Execute&lt;/span&gt;&lt;/tt&gt; tab, write your tasks, and mark them &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Ready&lt;/span&gt;&lt;/tt&gt;.
The Manager creates its own queues, runs what can safely run side by side,
and collects every agent's questions on the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Questions&lt;/span&gt;&lt;/tt&gt; tab.&lt;/p&gt;
&lt;p&gt;With the Manager on, tasks run &lt;em&gt;autonomously&lt;/em&gt;: each works as far as it can
and ends with a report of what it did, the judgement calls it made, and any
questions it still has.  Many people work with a single agent for a while
before turning on the Manager, and others use it from the start; it's up to
you.  Autonomous development with the Manager is covered in detail in the
next &lt;a class="reference" href="/hints/agent-autonomous"&gt;Wing Tip&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Triaging What Agents Found&lt;/h3&gt;
&lt;p&gt;Agents often notice problems outside the task they are working on, and the
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt; &lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt; proposes follow-up work as it goes.  These arrive as
Drafts on the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Plan&lt;/span&gt;&lt;/tt&gt; tab, and its &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Incoming&lt;/span&gt;&lt;/tt&gt; view lists the ones you
haven't looked at yet, grouped by goal, with their number shown beside
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Incoming&lt;/span&gt;&lt;/tt&gt;.  &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Seen&lt;/span&gt;&lt;/tt&gt; leaves a task as a Draft in its goal, &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Dismiss&lt;/span&gt;&lt;/tt&gt;
deletes it, and clicking its pill makes it &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Ready&lt;/span&gt;&lt;/tt&gt;.  From the keyboard, J
and K move between tasks, and R, S, and D make the selected task &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Ready&lt;/span&gt;&lt;/tt&gt;,
mark it seen, or dismiss it:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/agent-tasks-tool/incoming.png" alt="The Incoming view in the Plan tab of the Tasks tool" backrefs="" caption="Shown above:  The Incoming view in Compact rows, with a problem an agent found and a test the Tasks Manager proposed." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" width="640px" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  The Incoming view in Compact rows, with a problem an agent found and a test the Tasks Manager proposed.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;On the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Plan&lt;/span&gt;&lt;/tt&gt; and &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Execute&lt;/span&gt;&lt;/tt&gt; tabs, tasks you didn't write carry a chip
saying where they came from: &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Found&lt;/span&gt;&lt;/tt&gt;, &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt;, &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Fix&lt;/span&gt;&lt;/tt&gt;, or &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Check&lt;/span&gt;&lt;/tt&gt;.
Tasks that agents found or proposed also have a colored bar down their left
edge.  Hover over a chip to see the task's origin, or click it to show the
agent session that filed the task.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Following Up Within a Task&lt;/h3&gt;
&lt;p&gt;While a task is running, or after it completes, you can send follow-up
requests within the same agent session. The agent has the full context of
what came before, so you don't need to re-explain. Typical follow-ups:&lt;/p&gt;
&lt;div class="bullet-list"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="bullet"&gt;&amp;quot;Did you add unit tests for that?&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;&amp;quot;Actually, let's left justify the button instead&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;&amp;quot;Also update the user documentation for the features we just added&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;img src="https://wingware.com/images/blog/agent-tasks-tool/follow-up.png" alt="Typing a follow-up request in the AI Agent tool" backrefs="" caption="Shown above:  Typing a follow-up in the AI Agent tool to continue the same session -- here, asking the agent to update the documentation for the change it just made." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Typing a follow-up in the AI Agent tool to continue the same session -- here, asking the agent to update the documentation for the change it just made.&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Run Mode and Context&lt;/h3&gt;
&lt;p&gt;Before you queue a task, its &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Q&lt;/span&gt;&lt;/tt&gt; menu chooses its queue and whether it
starts a new agent session or reuses the queue's session.  A new session for
each task tends to save on tokens.  Reuse the session when a series of tasks
benefits from knowing what came before.&lt;/p&gt;
&lt;p&gt;A new session also sets the run mode.  &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Plan&lt;/span&gt;&lt;/tt&gt; has the agent explore the
code and write a plan without making any edits, which you can revise before
approving it.  Use it for larger or riskier changes, for tracking down a
difficult bug, and for safely reading code that another task is changing.
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Ask&lt;/span&gt; &lt;span class="pre"&gt;For&lt;/span&gt; &lt;span class="pre"&gt;Approval&lt;/span&gt;&lt;/tt&gt; asks before acting, except for what you have
pre-approved on the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Agent&lt;/span&gt;&lt;/tt&gt; tab of &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Project&lt;/span&gt; &lt;span class="pre"&gt;Properties&lt;/span&gt;&lt;/tt&gt; (by default,
edits inside the project).  &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Auto-Approve&lt;/span&gt;&lt;/tt&gt;, the default, lets the agent's
own judgement decide what to ask about.  The &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Q&lt;/span&gt;&lt;/tt&gt; menu lists only the
modes the queue's agent supports, and Wing warns before starting a task in
a mode that the agent handles more broadly than you might expect.&lt;/p&gt;
&lt;p&gt;While the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt; &lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt; is on, the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Q&lt;/span&gt;&lt;/tt&gt; menu is hidden, because the
Manager chooses each task's queue, session, and run mode.  To have a task
researched and planned before it is carried out in any case, right-click on
it and check &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Research&lt;/span&gt; &lt;span class="pre"&gt;First&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;When reusing a session, &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Full&lt;/span&gt; &lt;span class="pre"&gt;Context&lt;/span&gt;&lt;/tt&gt; keeps the whole conversation, and
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Compact&lt;/span&gt; &lt;span class="pre"&gt;Context&lt;/span&gt;&lt;/tt&gt;, for agents that can compact, summarizes it first.
Compacting consumes tokens itself, so it makes sense only in longer series
of related tasks:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/agent-tasks-tool/q-menu.png" alt="The Q menu open on a task" backrefs="" caption="Shown above:  Choosing Plan from a task's Q menu, so the agent writes a plan before it changes any code." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" width="640px" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Choosing Plan from a task's Q menu, so the agent writes a plan before it changes any code.&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Further Reading&lt;/h3&gt;
&lt;p&gt;Wing's AI agent integration has a lot of features, but you don't need to
understand all of them to get started. When in doubt, ask the agent!&lt;/p&gt;
&lt;p&gt;See also &lt;a class="reference" href="https://wingware.com/feature/agent"&gt;Autonomous Development with AI Agents&lt;/a&gt;,
and &lt;a class="reference" href="https://wingware.com/doc/aiagents/tasks"&gt;The Tasks Tool&lt;/a&gt; and
&lt;a class="reference" href="https://wingware.com/doc/aiagents"&gt;AI Agent-Assisted Development&lt;/a&gt; in
Wing's documentation.&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;&lt;p&gt;That's it for now!  Next time we'll look at autonomous development, where
the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt; &lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt; runs your agents for you.&lt;/p&gt;
&lt;p&gt;As always, please don't hesitate to email &lt;a class="reference" href="mailto:support&amp;#64;wingware.com"&gt;support&amp;#64;wingware.com&lt;/a&gt; if you run
into problems or have any questions.&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">https://wingware.com/hints/agent-tasks-tool</guid><pubDate>Fri, 10 Jul 2026 01:00:00 GMT</pubDate></item><item><title>Reviewing and Accepting Agent Changes in Wing Pro 12</title><link>https://wingware.com/hints/agent-review</link><description>&lt;p&gt;This &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tip&lt;/a&gt; continues the series on
AI agents in &lt;a class="reference" href="https://wingware.com/download/wingpro"&gt;Wing Pro&lt;/a&gt; 12. It
covers what happens after the agent finishes a task and before you commit it.&lt;/p&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Change Tracking and Review&lt;/h3&gt;
&lt;p&gt;When a task finishes running, it will transition from the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Execute&lt;/span&gt;&lt;/tt&gt; tab
of the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt; tool to the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Review&lt;/span&gt;&lt;/tt&gt; tab, where it waits for you to
inspect and accept or reject the work that was done.&lt;/p&gt;
&lt;p&gt;The &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Review&lt;/span&gt;&lt;/tt&gt; tab has a section for each queue that is running tasks, and
lists all the completed but unreviewed tasks under each queue. Review is done
on a per-queue basis. If you accept all changes from a queue, that does not
necessarily commit all files. However, granularity of commits is at the file
level so you may end up committing changes made in other queues. Wing keeps
track of who changed what and will warn in this case.&lt;/p&gt;
&lt;p&gt;If a task or queue has made changes that aren't committed yet, you can click on
the diff/merge icons in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Review&lt;/span&gt;&lt;/tt&gt; tab to visit the changed files and view
the differences.  More often, you will use the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Start&lt;/span&gt; &lt;span class="pre"&gt;Review&lt;/span&gt;&lt;/tt&gt; or &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Commit&lt;/span&gt;&lt;/tt&gt;
links on the queue to process all the files changed by that queue at once.&lt;/p&gt;
&lt;p&gt;&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Start&lt;/span&gt; &lt;span class="pre"&gt;Review&lt;/span&gt;&lt;/tt&gt; shows you a diff/merge session in Wing where you can move
through all the files and changes, accepting or rejecting each one or making
comments on changes using the pencil icon visible in the floating icon set
between changes. Pressing the pencil icon in the toolbar lets you make an
overall comment and reject the changes. This transitions the task back to
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Execute&lt;/span&gt;&lt;/tt&gt; and works on changes until it's ready to review again. Review
mode is entered again automatically. If you want to accept all the changes
instead, press the green check mark icon in the toolbar. Wing will then
commit that change set.&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/agent-review/task-review.png" alt="Diff review of agent edits in Wing Pro" backrefs="" caption="Shown above:  Reviewing the agent's proposed change side-by-side with the original file and commenting on a particular change." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Reviewing the agent's proposed change side-by-side with the original file and commenting on a particular change.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Commit&lt;/span&gt;&lt;/tt&gt; just executes the latter part of that
process, skipping the review phase. This is appropriate if you have already
reviewed the changes or trust that unit tests or other measures have
sufficiently vetted the changes in other ways. Looking at diffs is by no
means the only way to check an agent's work. You can also run tests or ask
another agent to review the work.  How much you read at the code level is
up to you, and will likely change as you gain confidence in your tests and
cross-checks.&lt;/p&gt;
&lt;p&gt;A task that ran autonomously through the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt; &lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt; (see the &lt;a class="reference" href="/hints/agent-autonomous"&gt;Wing Tip
on autonomous development&lt;/a&gt;) shows a summary
report of what it did and the decisions it made on your behalf, with
the reasoning and alternatives for each. You can disagree with any of these
and send it back with a description of what you want changed.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Commit Modes&lt;/h3&gt;
&lt;p&gt;Once you actually get to the point of committing, who commits and how is
controlled by &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Commit&lt;/span&gt; &lt;span class="pre"&gt;Mode&lt;/span&gt;&lt;/tt&gt; in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Agent&lt;/span&gt;&lt;/tt&gt; tab of &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Project&lt;/span&gt;
&lt;span class="pre"&gt;Properties&lt;/span&gt;&lt;/tt&gt;.  There are five choices:&lt;/p&gt;
&lt;p&gt;&lt;tt class="literal"&gt;&lt;span class="pre"&gt;The&lt;/span&gt; &lt;span class="pre"&gt;agent&lt;/span&gt; &lt;span class="pre"&gt;commits&lt;/span&gt; &lt;span class="pre"&gt;only&lt;/span&gt; &lt;span class="pre"&gt;when&lt;/span&gt; &lt;span class="pre"&gt;asked&lt;/span&gt;&lt;/tt&gt; -- The default.  The agent never
commits on its own; when you approve a review or use &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Commit&lt;/span&gt;&lt;/tt&gt;, it
writes a commit message from the work it just did and then does
the commit.&lt;/p&gt;
&lt;p&gt;&lt;tt class="literal"&gt;&lt;span class="pre"&gt;The&lt;/span&gt; &lt;span class="pre"&gt;agent&lt;/span&gt; &lt;span class="pre"&gt;commits&lt;/span&gt; &lt;span class="pre"&gt;after&lt;/span&gt; &lt;span class="pre"&gt;each&lt;/span&gt; &lt;span class="pre"&gt;task&lt;/span&gt;&lt;/tt&gt; -- The agent commits on its own at the
end of every completed task whose tests pass, without waiting for you.&lt;/p&gt;
&lt;p&gt;&lt;tt class="literal"&gt;&lt;span class="pre"&gt;The&lt;/span&gt; &lt;span class="pre"&gt;agent&lt;/span&gt; &lt;span class="pre"&gt;commits&lt;/span&gt; &lt;span class="pre"&gt;at&lt;/span&gt; &lt;span class="pre"&gt;its&lt;/span&gt; &lt;span class="pre"&gt;discretion&lt;/span&gt;&lt;/tt&gt; -- The agent commits on its own at
the logical stopping points it chooses, deferring when work is incomplete,
tests fail, or problems are unresolved.&lt;/p&gt;
&lt;p&gt;&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Wing&lt;/span&gt; &lt;span class="pre"&gt;commits&lt;/span&gt; &lt;span class="pre"&gt;with&lt;/span&gt; &lt;span class="pre"&gt;generated&lt;/span&gt; &lt;span class="pre"&gt;message&lt;/span&gt;&lt;/tt&gt; -- Wing commits immediately, without
involving the agent, using a commit message made out of the work summaries
for each of the tasks being committed.&lt;/p&gt;
&lt;p&gt;&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Wing&lt;/span&gt; &lt;span class="pre"&gt;presents&lt;/span&gt; &lt;span class="pre"&gt;commit&lt;/span&gt; &lt;span class="pre"&gt;message&lt;/span&gt; &lt;span class="pre"&gt;for&lt;/span&gt; &lt;span class="pre"&gt;review&lt;/span&gt;&lt;/tt&gt; -- Wing builds the commit message
from the task summaries and brings it up in Wing's commit dialog, waiting for
you to review the message and complete the commit yourself.&lt;/p&gt;
&lt;p&gt;When the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt; &lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt; is enabled for autonomous task queueing, its own
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Commits&lt;/span&gt;&lt;/tt&gt; setting overrides the above. It will either leave finished work
on &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Review&lt;/span&gt;&lt;/tt&gt; for you, commit automatically once tests pass, or follow a
policy that you describe, such as &amp;quot;commit code automatically, but leave
documentation changes for me to review&amp;quot;. If you let the Manager commit on its
own, consider working on a separate branch, so you stay in control of when
the work is merged into your main branch.  Note that even if the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;
&lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt; commits for you, tasks land on the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Review&lt;/span&gt;&lt;/tt&gt; tab and you can still
reject or revisit each decision it made.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;History&lt;/h3&gt;
&lt;p&gt;Once you have committed work done by a task, or marked it complete, it
transitions to the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;History&lt;/span&gt;&lt;/tt&gt; tab in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt; tool.  You can control
whether and how history is kept from the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;History&lt;/span&gt; &lt;span class="pre"&gt;Settings&lt;/span&gt;&lt;/tt&gt; item in the
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt; tool's &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Options&lt;/span&gt;&lt;/tt&gt; menu.&lt;/p&gt;
&lt;p&gt;From here (and in fact also from the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Review&lt;/span&gt;&lt;/tt&gt; tab) you can expand each
task to see the agent's responses and any follow-up requests made in the same
session (often as typed directly into the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Agent&lt;/span&gt;&lt;/tt&gt; tool).&lt;/p&gt;
&lt;p&gt;The history for each task also shows the run time and number of tokens consumed
by that task.  A total for all tasks is at the top of the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;History&lt;/span&gt;&lt;/tt&gt; tab.
This is a good way to estimate how expensive tasks were.&lt;/p&gt;
&lt;p&gt;The &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Resume&lt;/span&gt; &lt;span class="pre"&gt;Session&lt;/span&gt;&lt;/tt&gt; link on tasks lets you resume the agent's session,
if it is still available, to reinspect what was done.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Further Reading&lt;/h3&gt;
&lt;p&gt;Wing's AI agent integration has a lot of features, but you don't need to
understand all of them to get started. When in doubt, ask the agent!&lt;/p&gt;
&lt;p&gt;See also &lt;a class="reference" href="https://wingware.com/feature/agent"&gt;Autonomous Development with AI Agents&lt;/a&gt;
and &lt;a class="reference" href="https://wingware.com/doc/aiagents"&gt;AI Agent-Assisted Development&lt;/a&gt; in
Wing's documentation.&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;&lt;p&gt;That's it for now!  Next time we'll cover combining the agent with
Wing's testing tools.&lt;/p&gt;
&lt;p&gt;As always, please don't hesitate to email &lt;a class="reference" href="mailto:support&amp;#64;wingware.com"&gt;support&amp;#64;wingware.com&lt;/a&gt; if you run
into problems or have any questions.&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">https://wingware.com/hints/agent-review</guid><pubDate>Fri, 10 Jul 2026 01:00:00 GMT</pubDate></item><item><title>Introducing AI Agents in Wing Pro 12</title><link>https://wingware.com/hints/agent-intro</link><description>&lt;p&gt;&lt;a class="reference" href="https://wingware.com/download/wingpro"&gt;Wing Pro&lt;/a&gt; 12 integrates your
choice of AI coding agent: Claude Code, Codex, Antigravity, Copilot, Cursor,
goose, OpenCode, or any other agent that supports the &lt;a class="reference" href="https://agentclientprotocol.com"&gt;Agent Client Protocol&lt;/a&gt;. You can use Wing to queue agent
requests, manage their execution, and review and audit each completed task
before committing changes. Wing also gives the agent tools for code
analysis, unit testing, debugging, and version control, in a way that
reduces both elapsed time and token use.&lt;/p&gt;
&lt;p&gt;This Wing Tip is part of a series of &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tips&lt;/a&gt;
on working with AI agents in Wing.&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/agent-intro/overview.png" alt="The Tasks and AI Agent tools, with Testing and Mercurial below" backrefs="" caption="Shown above:  The Tasks Manager running three queues on the Tasks tool's Execute tab, beside one queue's session in the AI Agent tool." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  The Tasks Manager running three queues on the Tasks tool's Execute tab, beside one queue's session in the AI Agent tool.&lt;/i&gt;&lt;/p&gt;&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Setup&lt;/h3&gt;
&lt;p&gt;To get started:&lt;/p&gt;
&lt;div class="ordered-list"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="bullet"&gt;Install or upgrade to &lt;a class="reference" href="https://wingware.com/downloads/wing-pro"&gt;Wing Pro 12&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;Install the agent you want to use, and get an account or API key for it
if you don't already have one.  &lt;a class="reference" href="https://wingware.com/doc/aiagents/setup"&gt;Setting Up an AI Agent&lt;/a&gt; lists what each agent
needs.  For sustained use, a subscription is generally much cheaper
than paying for usage on an API key.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;From the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Project&lt;/span&gt;&lt;/tt&gt; menu, choose &lt;tt class="literal"&gt;&lt;span class="pre"&gt;New&lt;/span&gt; &lt;span class="pre"&gt;Project&lt;/span&gt;&lt;/tt&gt;, check &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Set&lt;/span&gt; &lt;span class="pre"&gt;Up&lt;/span&gt; &lt;span class="pre"&gt;for&lt;/span&gt; &lt;span class="pre"&gt;AI&lt;/span&gt;
&lt;span class="pre"&gt;Agent&lt;/span&gt;&lt;/tt&gt;, choose your agent, enable the autonomous task manager for easier
implementation workflow, and select an existing or new directory and
Python environment.  If you already have a Wing project, just open it
and choose &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Set&lt;/span&gt; &lt;span class="pre"&gt;Up&lt;/span&gt; &lt;span class="pre"&gt;for&lt;/span&gt; &lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Agent&lt;/span&gt;&lt;/tt&gt; from the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Project&lt;/span&gt;&lt;/tt&gt; menu.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;Set your new or existing project up in a revision control repository.
You can use an agent without it, but Wing's task review features
won't work.  Even a local git repository (in the same directory as your
sources) will work.  Ask the agent for help with setup.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Your First Session&lt;/h3&gt;
&lt;p&gt;Type a request into the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Agent&lt;/span&gt;&lt;/tt&gt; tool and press &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Enter&lt;/span&gt;&lt;/tt&gt; -- or add
it as a task in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt; tool, which queues the work and lets you
review it before committing.  For example:&lt;/p&gt;
&lt;div class="bullet-list"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="bullet"&gt;&amp;quot;Can you write, run, and fix unit tests for the new user registration
dialog?&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;&amp;quot;Let's change how this works so it uses a &lt;tt class="literal"&gt;&lt;span class="pre"&gt;.jsonl&lt;/span&gt;&lt;/tt&gt; file instead.&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;&amp;quot;Find out why the dashboard sometimes shows yesterday's data, and
propose a fix.&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;p&gt;The agent reads the relevant files, makes edits, and reports back.&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/agent-intro/first-task.png" alt="Choosing a queue from the Tasks tool's Q menu" backrefs="" caption="Shown above:  Choosing a queue for a task from its Q menu, which also sets the run mode (such as Plan)." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Choosing a queue for a task from its Q menu, which also sets the run mode (such as Plan).&lt;/i&gt;&lt;/p&gt;&lt;p&gt;If the result isn't quite right, follow up in the same session -- for
example &amp;quot;good, but please add a regression test that would have caught
this&amp;quot;.  The agent has the context of the previous turn and refines
accordingly.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Where to Next&lt;/h3&gt;
&lt;p&gt;Once you are comfortable working with one agent, you can turn on the
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt; &lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt; to have agents carry out a series of tasks on their own,
while you write tasks, answer questions, look over the problems agents
find in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Plan&lt;/span&gt;&lt;/tt&gt; tab's &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Incoming&lt;/span&gt;&lt;/tt&gt; view, and review the results.  When to
take that step is up to you.  See the &lt;a class="reference" href="/hints/agent-autonomous"&gt;Wing Tip on autonomous development&lt;/a&gt; for how to get started.&lt;/p&gt;
&lt;p&gt;The other Wing Tips in this series look more closely at:&lt;/p&gt;
&lt;div class="bullet-list"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="bullet"&gt;The &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt; tool as a way to manage one or more AI agents.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;Autonomous development with the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt; &lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;Reviewing and accepting the agent's edits.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;Using unit tests to keep code quality high and simplify the review process.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;Fixing code warnings with the agent, in place or in bulk.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;Best practices for getting reliable results.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;p&gt;Beyond the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt; tool, Wing also offers one-click &lt;tt class="literal"&gt;&lt;span class="pre"&gt;FIX&lt;/span&gt;&lt;/tt&gt; actions for
exceptions, failing tests, and code warnings, plus AI actions in the editor
to explain, review, or optimize code -- see &lt;a class="reference" href="/feature/agent"&gt;Autonomous Development with AI
Agents&lt;/a&gt; for the full picture.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Further Reading&lt;/h3&gt;
&lt;p&gt;Wing's AI agent integration has a lot of features, but you don't need to
understand all of them to get started. When in doubt, ask the agent!&lt;/p&gt;
&lt;p&gt;See also &lt;a class="reference" href="https://wingware.com/feature/agent"&gt;Autonomous Development with AI Agents&lt;/a&gt;
and &lt;a class="reference" href="https://wingware.com/doc/aiagents"&gt;AI Agent-Assisted Development&lt;/a&gt; in
Wing's documentation.&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;&lt;p&gt;That's it for now!  Next time we'll take a closer look at the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt;
tool.&lt;/p&gt;
&lt;p&gt;As always, please don't hesitate to email &lt;a class="reference" href="mailto:support&amp;#64;wingware.com"&gt;support&amp;#64;wingware.com&lt;/a&gt; if you run
into problems or have any questions.&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">https://wingware.com/hints/agent-intro</guid><pubDate>Fri, 10 Jul 2026 01:00:00 GMT</pubDate></item><item><title>Best Practices for Working with AI Agents in Wing Pro 12</title><link>https://wingware.com/hints/agent-best-practices</link><description>&lt;p&gt;This is the closing &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tip&lt;/a&gt; in the
series on AI agents in &lt;a class="reference" href="https://wingware.com/download/wingpro"&gt;Wing Pro&lt;/a&gt;
12.  It collects the habits that produce reliable results.&lt;/p&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Basic Principles&lt;/h3&gt;
&lt;p&gt;The fact that AI agents work as well as they do is remarkable, given that
the LLMs that underlie them are (famously) prone to hallucinating and making
other mistakes. The reason they work is that they build in self-checking
feedback loops for every level of the software development process.&lt;/p&gt;
&lt;p&gt;Your methodology in using them should embrace and build on this basic
philosophy of cross-checking everything.  There are two parts to this:&lt;/p&gt;
&lt;div class="ordered-list"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="bullet"&gt;Work in an environment where mistakes are contained and correctable.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;Recheck and review all work before accepting or shipping it.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;AI Safety&lt;/h3&gt;
&lt;p&gt;The better AI agents have good safety controls out of the box.  But like
people, they can make mistakes, and when they do, they make them very
quickly.&lt;/p&gt;
&lt;p&gt;In order for an agent's work to be contained and correctable, you need to
set up a reasonably protected environment in a VM, on a dedicated host, or
at least in a dedicated account.  Don't run an agent in an environment
where it has access to the keys to your server infrastructure or sensitive
data like customer records.&lt;/p&gt;
&lt;div class="bullet-list"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="bullet"&gt;Make sure your environment is backed up automatically, ideally
continuously through something like Dropbox or iCloud.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;Use revision control with a remote repository that the agent cannot
access.  Ideally, set up a VCS-only SSH key and do all push or other
operations that affect the remote repository manually.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;p&gt;Exactly how you approach this depends on your needs and risk tolerance, and
the sensitivity of your work. In fact asking the agent for solutions is a
great way to find relatively easy ways to set up an environment you are
comfortable with.  See also &lt;a class="reference" href="https://wingware.com/doc/aiagents/safety"&gt;AI Agent Safety&lt;/a&gt; in Wing's documentation.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Treat the Agent Like a Capable Employee&lt;/h3&gt;
&lt;p&gt;The agent is fast, patient, and capable, but still needs clear instructions
and supervision. For the most part, you will no longer be writing code;
instead, it's your job to frame tasks, review outcomes, and steer iteration.&lt;/p&gt;
&lt;p&gt;Your goal should be to set up a working environment that keeps it honest.
That starts with clear instructions, which may be a one-line bug fix or a
high-level specification that the agent researches and breaks into smaller
tasks.  It includes unit testing.  It may include independent AI agent
validation of work for correctness, performance, security, and other
metrics.&lt;/p&gt;
&lt;p&gt;Write down your development policies too, from coding style to workflow
rules, in &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AGENTS.md&lt;/span&gt;&lt;/tt&gt; (outside the block Wing maintains there).  Agents
read it at the start of every session.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Cross-Check from Different Angles&lt;/h3&gt;
&lt;p&gt;A single review pass can miss things on larger changes. That's true whether
it's a human working independently, or an AI agent writing the code. Instead,
where appropriate, try to run work through a few different lenses:&lt;/p&gt;
&lt;div class="bullet-list"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="bullet"&gt;&lt;strong&gt;Behavioral&lt;/strong&gt; -- does this code really do everything in the spec?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;&lt;strong&gt;End Cases&lt;/strong&gt; -- does this code fail to handle end cases that could occur?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;&lt;strong&gt;Security&lt;/strong&gt; -- are there security flaws likely to be exploited here?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;&lt;strong&gt;Performance&lt;/strong&gt; -- is this code going to be fast enough in production?&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;p&gt;Since you can make the AI agent do the assessments, it becomes possible to
review code in far more ways and far more deeply than was possible before the
advent of AI agents. You can ask the agent to do things that no human
employee would put up with:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;Re-read the change you just made and propose the three most likely sources
of bugs. Don't fix anything; just list them.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Wing packages several of these lenses as one-click AI actions in the
editor's Code Actions menu -- &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Review&lt;/span&gt; &lt;span class="pre"&gt;for&lt;/span&gt; &lt;span class="pre"&gt;Security&lt;/span&gt; &lt;span class="pre"&gt;Risks&lt;/span&gt;&lt;/tt&gt;, &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Review&lt;/span&gt; &lt;span class="pre"&gt;for&lt;/span&gt; &lt;span class="pre"&gt;Code&lt;/span&gt;
&lt;span class="pre"&gt;Quality&lt;/span&gt;&lt;/tt&gt;, and &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Optimize&lt;/span&gt; &lt;span class="pre"&gt;Code&lt;/span&gt;&lt;/tt&gt; -- each of which frames the request for you.&lt;/p&gt;
&lt;p&gt;When agents work autonomously with the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt; &lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt;, make some of these
review passes a regular part of your workflow, as tasks of their own at key
points.  Each can turn up problems that become new tasks.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Review at the Behavior Level&lt;/h3&gt;
&lt;p&gt;Wing presents agent edits as diffs, which makes it tempting to review
line by line.  For small changes that's fine.  For larger ones:&lt;/p&gt;
&lt;div class="bullet-list"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="bullet"&gt;Read the task's report -- its summary and judgement calls -- and the
test results first.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;Skim the diff for surprises -- new dependencies, new files, scope
creep, suspicious patterns.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;Spot-check a few hunks to confirm the agent's style.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;Trust the rest, contingent on tests and other cross-checks passing.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;p&gt;If you don't trust the test suite enough to do this, strengthen the
suite first.  The good news is, you just ask the agent to do that.&lt;/p&gt;
&lt;p&gt;How much you read at the code level is up to you, and your answer will
likely change over time.  Once you trust your tests and cross-checks, you
may find yourself reading reports and committing without reading every
diff, and turning on the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt; &lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt; so agents can carry out a series
of tasks on their own.  See the &lt;a class="reference" href="/hints/agent-autonomous"&gt;Wing Tip on autonomous development&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;When the Agent Gets Stuck&lt;/h3&gt;
&lt;p&gt;Most of the time you don't need to watch the details of what the agent is
doing.  But occasionally, especially on a hard bug, an agent will start
spinning its wheels -- trying one speculative fix after another, fixating on
an approach that isn't working, or even brushing off your reports that
something is still broken.&lt;/p&gt;
&lt;p&gt;When you notice this, step in once or twice with more specific guidance, or
point it at the debugger.  When you hit an exception yourself, the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;FIX&lt;/span&gt;&lt;/tt&gt;
action in the Exceptions tool hands it to the agent with the full debug
context.  If that doesn't turn things around, don't keep
iterating.  It is usually better to start fresh than to try to course-correct
an agent that has gone off the rails.&lt;/p&gt;
&lt;p&gt;Before you do, look for any unwanted or half-finished code the agent left
behind, and either ask it to remove that or revert to your last known-good
commit.  Then use &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Clear&lt;/span&gt; &lt;span class="pre"&gt;Conversation&lt;/span&gt;&lt;/tt&gt; in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Agent&lt;/span&gt;&lt;/tt&gt; tool's
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Options&lt;/span&gt;&lt;/tt&gt; menu to start a new session, or start a new task from the
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt; tool.  A fresh session has no memory of the origin or correctness of
uncommitted code, so if you leave a broken attempt in place it may assume that
code is intentional and fixate on the same wrong solution.  Retrying the fix in
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Plan&lt;/span&gt;&lt;/tt&gt; mode can help too, since it makes the agent reason through a new
approach before changing anything.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Understanding Context and Token Costs&lt;/h3&gt;
&lt;p&gt;An agent uses both its already-learned knowledge about the software
development process, from its original training, and also facts it has
learned about your development environment and project.  When you set up an
agent with &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Set&lt;/span&gt; &lt;span class="pre"&gt;Up&lt;/span&gt; &lt;span class="pre"&gt;for&lt;/span&gt; &lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Agent&lt;/span&gt;&lt;/tt&gt;, Wing writes development guides into the
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;.wing&lt;/span&gt;&lt;/tt&gt; directory, describing how to use Wing's tools and your project's
testing regimen and commit policy, and points &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AGENTS.md&lt;/span&gt;&lt;/tt&gt; at them.  Wing
also offers to run the agent's own project analysis, if it has one, so the
agent starts with its own notes about your code as well.&lt;/p&gt;
&lt;p&gt;All of this is combined with input seen in the current session into a
working context that is essentially a short-term memory.  Every time you
start a new session, the agent forgets everything, and then reloads some of
its memories from those files.&lt;/p&gt;
&lt;p&gt;This is a simplification, but enough to be able to manage what really
matters here -- token use.  The more the agent has in its memory, and the
more it has to read through while doing tasks, the more tokens it uses up
out of your allowance.  Keeping that under control is an important part of
using AI agents.&lt;/p&gt;
&lt;p&gt;Wing helps with that.  We've designed the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt; tool and the MCP servers
that agents use to keep token consumption lower.  In our initial benchmarks,
run with Claude Code, this often meaningfully reduced the API cost and time
to finish a task, though how much depends on the work -- the tools help most
when the bottleneck is locating code or runtime state.  See the &lt;a class="reference" href="/psupport/wing12/benchmarks/bench-intro.html"&gt;benchmark
write-up&lt;/a&gt; for the details.&lt;/p&gt;
&lt;p&gt;The decision you will have to make is when to clear the conversation in
an agent session, or when to use the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Q&lt;/span&gt;&lt;/tt&gt; menu in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;&lt;/tt&gt; tool to
change the session reuse and run modes (as discussed in an earlier Wing Tip)
to use context when relevant and discard it when not.  When the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tasks&lt;/span&gt;
&lt;span class="pre"&gt;Manager&lt;/span&gt;&lt;/tt&gt; is enabled, it makes these choices for you, running closely
related tasks in the same session so later ones keep the context of earlier
ones.  Setting goals aside with the clock icon in their headers on the
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Plan&lt;/span&gt;&lt;/tt&gt; tab keeps both your plan and the Manager focused on current work.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Further Reading&lt;/h3&gt;
&lt;p&gt;Wing's AI agent integration has a lot of features, but you don't need to
understand all of them to get started. When in doubt, ask the agent!&lt;/p&gt;
&lt;p&gt;See also &lt;a class="reference" href="https://wingware.com/feature/agent"&gt;Autonomous Development with AI Agents&lt;/a&gt;,
&lt;a class="reference" href="https://wingware.com/doc/aiagents"&gt;AI Agent-Assisted Development&lt;/a&gt;, and
&lt;a class="reference" href="https://wingware.com/doc/aiagents/tips"&gt;Using AI Agents Effectively&lt;/a&gt; in
Wing's documentation.&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;&lt;p&gt;That's it for the AI agent series!  We'll be back soon with more &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing
Tips&lt;/a&gt; for using Wing in everyday Python
development.&lt;/p&gt;
&lt;p&gt;As always, please don't hesitate to email &lt;a class="reference" href="mailto:support&amp;#64;wingware.com"&gt;support&amp;#64;wingware.com&lt;/a&gt; if you run
into problems or have any questions.&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">https://wingware.com/hints/agent-best-practices</guid><pubDate>Fri, 10 Jul 2026 01:00:00 GMT</pubDate></item><item><title>Legacy AI Assisted Development in Wing Pro</title><link>https://wingware.com/hints/ai-dev</link><description>&lt;div class="note"&gt;
This article describes Wing 11's single-query AI features (&lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Coder&lt;/span&gt;&lt;/tt&gt;).
In Wing 12 these are legacy and hidden by default.  For Wing 12's
integration of AI agents such as Claude Code, Codex, and Copilot, see
&lt;a class="reference" href="https://wingware.com/feature/agent"&gt;Autonomous Development with AI Agents&lt;/a&gt;.&lt;/div&gt;
&lt;p&gt;Generative AI is astonishingly capable as a programmer's assistant. As long as you provide
it with sufficient context and clear instructions, it can cleanly and correctly execute a
wide variety of programming tasks. This &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tip&lt;/a&gt;
introduces &lt;a class="reference" href="https://wingware.com/download/wingpro"&gt;Wing Pro&lt;/a&gt;'s AI assisted software
development capabilities.&lt;/p&gt;
&lt;div class="note"&gt;
This guide is for Wing Pro 11's improved AI assisted development UI.  If you have Wing Pro 10,
you may want to upgrade or instead refer to the integrated documentation in Wing Pro 10's Help menu.&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;AI Code Suggestion&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here is an example where Wing Pro's AI code suggestion capability is used to write a
missing method for an existing class. The AI knows what to add because it can see what
precedes and follows the insertion point in the editor. It infers from that context what
code you would like it to produce:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/ai-dev/ai-suggest.gif" alt="AI code suggestion in Wing Pro" backrefs="" caption="Shown above:  Typing 'def get_full_name' followed by Ctrl-? to initiate AI suggestion mode.  The suggested code is accepted by pressing Enter." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Typing 'def get_full_name' followed by Ctrl-? to initiate AI suggestion mode.  The suggested code is accepted by pressing Enter.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Writing New Code with AI&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;An even better way to write new code is to use Wing Pro's &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Coder&lt;/span&gt;&lt;/tt&gt; to provide the AI
with written instructions. For example, you might ask it to &amp;quot;add client and server classes
that expose all the public methods of FileManager to a client process using sockets and
JSON&amp;quot;:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/ai-dev/ai-refactor-add-code.gif" alt="Writing new code with AI Coder in Wing Pro" backrefs="" caption="Shown above:  Using the AI Coder tool to request implementation of client/server classes for remote access to an existing class." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Using the AI Coder tool to request implementation of client/server classes for remote access to an existing class.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;The processing time shown in this example is changing for the better as generative AI
advances.&lt;/p&gt;
&lt;p&gt;Simpler and perhaps more common requests like &amp;quot;write documentation strings for these
methods&amp;quot; and &amp;quot;create unit tests for class Person&amp;quot; of course also work. In general, Wing
Pro's &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Coder&lt;/span&gt;&lt;/tt&gt; can do any reasonably sized chunk of work for which you can clearly
state instructions.&lt;/p&gt;
&lt;p&gt;Used correctly, this capability will have a significant impact on your productivity as a
programmer. Instead of typing out code manually, your role changes to one of directing an
intelligent assistant capable of completing a wide range of programming tasks very
quickly. You will still need to review and accept or reject the AI's work. Generative AI
can't replace you, but it allows you to concentrate much more on higher-level design and
much less on implementation details.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AI Transformation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Coder&lt;/span&gt;&lt;/tt&gt; can also be used to request changes to existing code. For example, you might ask
it to &amp;quot;convert this threaded implementation to run asynchronously instead&amp;quot;:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/ai-dev/ai-refactor.gif" alt="AI refactoring in Wing Pro" backrefs="" caption="Shown above:  Running the highlighted request in the AI Coder to convert multithreaded code to run asynchronously instead." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Running the highlighted request in the AI Coder to convert multithreaded code to run asynchronously instead.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Getting Started&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To try out AI assisted development in Wing Pro, see the &lt;a class="reference" href="https://wingware.com/doc/ai/quickstart"&gt;AI Quick Start&lt;/a&gt; and the rest of the &lt;a class="reference" href="https://wingware.com/doc/ai"&gt;AI Assisted Development&lt;/a&gt; documentation for details on setup, framing requests, and
monitoring costs. It takes a bit of time to get started, but it is well worth the effort
to incorporate generative AI into your tool chain.&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;&lt;p&gt;That's it for now!  Next time we'll take a look at &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Chat&lt;/span&gt;&lt;/tt&gt;, which allows you to talk
about code without directly making changes to it.&lt;/p&gt;
&lt;p&gt;As always, please don't hesitate to email &lt;a class="reference" href="mailto:support&amp;#64;wingware.com"&gt;support&amp;#64;wingware.com&lt;/a&gt; if you run into problems or
have any questions.&lt;/p&gt;
</description><guid isPermaLink="true">https://wingware.com/hints/ai-dev</guid><pubDate>Wed, 24 Jan 2024 01:00:00 GMT</pubDate></item><item><title>Legacy AI Chat in Wing Pro</title><link>https://wingware.com/hints/ai-chat</link><description>&lt;div class="note"&gt;
This article describes Wing 11's single-query AI features (&lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Chat&lt;/span&gt;&lt;/tt&gt;).
In Wing 12 these are legacy and hidden by default.  For Wing 12's
integration of AI agents such as Claude Code, Codex, and Copilot, see
&lt;a class="reference" href="https://wingware.com/feature/agent"&gt;Autonomous Development with AI Agents&lt;/a&gt;.&lt;/div&gt;
&lt;p&gt;This &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tip&lt;/a&gt; describes how to use the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Chat&lt;/span&gt;&lt;/tt&gt; tool
in &lt;a class="reference" href="https://wingware.com/download/wingpro"&gt;Wing Pro&lt;/a&gt; to interact with a generative AI
assistant, in order to ask questions about existing code or work through the design and
implementation of new code.&lt;/p&gt;
&lt;p&gt;There are several reasons to use &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Chat&lt;/span&gt;&lt;/tt&gt; rather than AI suggestion and &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Coder&lt;/span&gt;&lt;/tt&gt;,
as they were described in the &lt;a class="reference" href="https://wingware.com/hints/ai-dev"&gt;previous Wing Tip&lt;/a&gt;:&lt;/p&gt;
&lt;div class="ordered-list"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="bullet"&gt;&lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Chat&lt;/span&gt;&lt;/tt&gt; can provide more detailed responses that include both code and explanation
of the code.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;&lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Chat&lt;/span&gt;&lt;/tt&gt; lets you iterate within the context of your previous conversation, making
it easier to drill down to the details that you are trying to understand or to refine
an implementation.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bullet"&gt;&lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Chat&lt;/span&gt;&lt;/tt&gt; cannot directly modify your code or place code anywhere that it can be
executed, which helps to address AI safety concerns.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Asking About Existing Code&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Generative AI is particularly good at reading and summarizing large amounts of text or
code. You can ask it to focus on specific code or provide it with a number of whole files,
and then ask it to explain them to you.  It may take some time to process your request,
but you'll receive results much faster than trying to read through the code yourself.&lt;/p&gt;
&lt;p&gt;Here is an example where Wing Pro's &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Chat&lt;/span&gt;&lt;/tt&gt; tool is used to ask about the purpose of
a particular class and then for more information about several methods within the class:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/ai-chat/ai-chat-explain.gif" alt="Using AI Chat to explain code in Wing Pro" backrefs="" caption="Shown above: Asking AI Chat to explain class Assistant and then the purpose of several of its methods that are &amp;#64;classmethod" class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above: Asking AI Chat to explain class Assistant and then the purpose of several of its methods that are @classmethod&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Writing New Code&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can also ask the AI to write code in the context of an AI chat.  Here's an example
where the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Chat&lt;/span&gt;&lt;/tt&gt; is asked to produce an example of using a particular class:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/ai-chat/ai-chat-write.gif" alt="Using AI Chat to produce example code" backrefs="" caption="Shown above: Asking AI Chat to write example code that illustrates how to use class Assistant" class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above: Asking AI Chat to write example code that illustrates how to use class Assistant&lt;/i&gt;&lt;/p&gt;&lt;p&gt;In this example there was significant processing time involved, but this has improved as
generative AI advances, and you'll certainly receive results far faster than if you wrote
the code yourself.&lt;/p&gt;
&lt;p&gt;Although &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Chat&lt;/span&gt;&lt;/tt&gt; will never modify your code directly, you can use blocks of code it
produces by right-clicking on them to copy or paste into your current editor.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Getting Started&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To try out &lt;tt class="literal"&gt;&lt;span class="pre"&gt;AI&lt;/span&gt; &lt;span class="pre"&gt;Chat&lt;/span&gt;&lt;/tt&gt; in Wing Pro, see the &lt;a class="reference" href="https://wingware.com/doc/ai/quickstart"&gt;AI Quick Start&lt;/a&gt; and the rest of the &lt;a class="reference" href="https://wingware.com/doc/ai"&gt;AI Assisted Development&lt;/a&gt; documentation for details on setup, framing requests, and
monitoring costs. It takes a bit of time to get started, but it is well worth the effort
to incorporate generative AI into your tool chain.&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;&lt;p&gt;That's it for now! We'll be back soon with more &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tips&lt;/a&gt;
for Wing Python IDE.&lt;/p&gt;
&lt;p&gt;As always, please don't hesitate to email &lt;a class="reference" href="mailto:support&amp;#64;wingware.com"&gt;support&amp;#64;wingware.com&lt;/a&gt; if you run into problems or
have any questions.&lt;/p&gt;
</description><guid isPermaLink="true">https://wingware.com/hints/ai-chat</guid><pubDate>Wed, 24 Jan 2024 01:00:00 GMT</pubDate></item><item><title>Unit Testing in Wing Pro</title><link>https://wingware.com/hints/unit-testing</link><description>&lt;p&gt;This &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tip&lt;/a&gt; introduces the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; tool in
&lt;a class="reference" href="https://wingware.com/download/wingpro"&gt;Wing Pro&lt;/a&gt;, which can be used to run and debug
unit tests designed for the unittest, pytest, doctest, nose, or Django testing frameworks.
Wing can collect code coverage statistics, so you can see if your tests are properly
exercising your code, and so that Wing can determine which tests need to be re-run after
you make edits to your code.&lt;/p&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Identifying Test Files&lt;/h3&gt;
&lt;p&gt;You can identify files to run as tests in your project either by setting &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Test&lt;/span&gt; &lt;span class="pre"&gt;file&lt;/span&gt;
&lt;span class="pre"&gt;patterns&lt;/span&gt;&lt;/tt&gt; under the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; tab in &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Project&lt;/span&gt; &lt;span class="pre"&gt;Properties&lt;/span&gt;&lt;/tt&gt; (accessed from the
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Project&lt;/span&gt;&lt;/tt&gt; menu) or by adding individual test files with &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Add&lt;/span&gt; &lt;span class="pre"&gt;Single&lt;/span&gt; &lt;span class="pre"&gt;File&lt;/span&gt;&lt;/tt&gt; and &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Add&lt;/span&gt;
&lt;span class="pre"&gt;Current&lt;/span&gt; &lt;span class="pre"&gt;File&lt;/span&gt;&lt;/tt&gt; in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; menu.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Running and Debugging Tests&lt;/h3&gt;
&lt;p&gt;Once you have identified test files, you should see them listed in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; tool
and can use the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Run&lt;/span&gt; &lt;span class="pre"&gt;Tests&lt;/span&gt;&lt;/tt&gt; button to run them. The &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; tool will update as
tests complete, indicating which tests passed and failed. This includes display of any
exception encountered and output from the tests.&lt;/p&gt;
&lt;p&gt;Failed tests may then be debugged by selecting them in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; tool and pressing
the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Debug&lt;/span&gt; &lt;span class="pre"&gt;Tests&lt;/span&gt;&lt;/tt&gt; button:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/testing/testing.gif" alt="Testing Tool in Wing Pro" backrefs="" caption="Shown above:  Running unit tests in Wing Pro, inspecting test results, and debugging one failed test." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Running unit tests in Wing Pro, inspecting test results, and debugging one failed test.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;The items in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; menu can be used to run or re-run tests selectively, for
example only those at the caret in the editor, those that previously failed, or those
that have not yet been run.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Code Coverage&lt;/h3&gt;
&lt;p&gt;To enable collection of code coverage statistics, make sure you have installed
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;coverage&lt;/span&gt;&lt;/tt&gt; (for example with &lt;tt class="literal"&gt;&lt;span class="pre"&gt;pip&lt;/span&gt; &lt;span class="pre"&gt;install&lt;/span&gt; &lt;span class="pre"&gt;coverage&lt;/span&gt;&lt;/tt&gt;), select &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Use&lt;/span&gt; &lt;span class="pre"&gt;Code&lt;/span&gt; &lt;span class="pre"&gt;Coverage&lt;/span&gt;&lt;/tt&gt; in
the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; tool, and then run some or all of your unit tests. Wing annotates every
line of code in editors to indicate whether that line was reached by any of the unit tests
that you have run. Hover the mouse cursor over lines marked in green to see which tests
reached that line:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/testing/testing-coverage.gif" alt="Code Coverage Annotations" backrefs="" caption="Shown above:  Code coverage marks indicate which lines of code have been tested." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Code coverage marks indicate which lines of code have been tested.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;When code coverage is enabled, Wing will watch your edits in order to determine which
previously run test results are invalidated by those edits. Any tests that reached the
edited code will be marked as invalid in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; tool by changing the color of the
test result icon to yellow:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/testing/testing-invalidated.gif" alt="Invalidated Unit Test Results" backrefs="" caption="Shown above:  A unit test result is invalidated by editing code that was reached by that test.  All the tests with invalidated test results are then re-run with Run Stale Tests in the Testing menu." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  A unit test result is invalidated by editing code that was reached by that test.  All the tests with invalidated test results are then re-run with Run Stale Tests in the Testing menu.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;An HTML code coverage report and various code coverage data export options are available
in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Testing&lt;/span&gt;&lt;/tt&gt; menu.&lt;/p&gt;
&lt;p&gt;For more information on unit testing and code coverage in Wing Pro, see the &lt;a class="reference" href="/doc/testing"&gt;Unit Testing&lt;/a&gt; documentation.&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;&lt;p&gt;That's it for now! We'll be back soon with more &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tips&lt;/a&gt;
for Wing Python IDE.&lt;/p&gt;
&lt;p&gt;As always, please don't hesitate to email &lt;a class="reference" href="mailto:support&amp;#64;wingware.com"&gt;support&amp;#64;wingware.com&lt;/a&gt; if you run into problems or
have any questions.&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">https://wingware.com/hints/unit-testing</guid><pubDate>Thu, 08 Jun 2023 01:00:00 GMT</pubDate></item><item><title>Source Assistant in Wing Pro</title><link>https://wingware.com/hints/source-assistant</link><description>&lt;p&gt;This &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tip&lt;/a&gt; introduces the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Source&lt;/span&gt; &lt;span class="pre"&gt;Assistant&lt;/span&gt;&lt;/tt&gt; tool in
&lt;a class="reference" href="https://wingware.com/download/wingpro"&gt;Wing Pro&lt;/a&gt;, which provides context-sensitive
at-your-fingertips code intelligence and documentation as you navigate through or write
Python code.&lt;/p&gt;
&lt;p&gt;The Source Assistant is where Wing Pro shows details about the type of a symbol, including
documentation, call signature, and information about object inheritance and overridden
methods. For builtin types and the standard library, this includes also links into Python
documentation.&lt;/p&gt;
&lt;p&gt;The Source Assistant is integrated with every part of Wing IDE, so it shows information
for the current selection in the editor, auto-completer, Python Shell, Source Browser,
Project manager, and Debug Console.  It continuously updates as you move through your
code or write new code.&lt;/p&gt;
&lt;p&gt;Here are some examples of the Source Assistant in action in the editor, auto-completer,
and Source Browser:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/source-assistant/source-assistant.gif" alt="Source Assistant in Wing Pro" backrefs="" caption="Shown above:  Moving through code in the editor, the auto-completer, and Source Browser to view type signature, documentation, and other code intelligence in Wing Pro's Source Assistant tool." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Moving through code in the editor, the auto-completer, and Source Browser to view type signature, documentation, and other code intelligence in Wing Pro's Source Assistant tool.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;See the &lt;a class="reference" href="/doc/edit/source-assistant"&gt;Source Assistant&lt;/a&gt; documentation for details.&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;&lt;p&gt;That's it for now! We'll be back soon with more &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tips&lt;/a&gt;
for Wing Python IDE.&lt;/p&gt;
&lt;p&gt;As always, please don't hesitate to email &lt;a class="reference" href="mailto:support&amp;#64;wingware.com"&gt;support&amp;#64;wingware.com&lt;/a&gt; if you run into problems or
have any questions.&lt;/p&gt;
</description><guid isPermaLink="true">https://wingware.com/hints/source-assistant</guid><pubDate>Thu, 08 Jun 2023 01:00:00 GMT</pubDate></item><item><title>Live Interactive Python Coding in Wing Pro</title><link>https://wingware.com/hints/live-coding</link><description>&lt;p&gt;This &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tip&lt;/a&gt; describes how to use the debugger in &lt;a class="reference" href="https://wingware.com/download/wingpro"&gt;Wing
Pro&lt;/a&gt; to write new Python code with direct access
to the runtime state that the code is intended for, so you can immediately try out the
code that you write. This is a far more efficient way to write most code, compared with
working offline.&lt;/p&gt;
&lt;p&gt;The key to working interactively in Wing is to run the debugger to a breakpoint in the
code that you are working on. Once this is done, the auto-completer and other code
intelligence features in Wing use both static analysis and runtime type analysis in
code that is active on the debug process stack. The source of a symbol in the completer is
indicated with the &lt;img src="https://wingware.com/images/doc/en/icons/wingide-autocomplete-runtime.png" alt="runtime" backrefs="" class="inline-image" dupnames="" height="18" ids="" names="" width="36" /&gt; cog &amp;quot;runtime&amp;quot; icon.&lt;/p&gt;
&lt;p&gt;In this context, you can immediately try out newly written code, and retry it as often as
needed after correcting errors, by executing it in Wing Pro's &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Debug&lt;/span&gt; &lt;span class="pre"&gt;Console&lt;/span&gt;&lt;/tt&gt; tool. You
do need to be mindful of what the (possibly incorrect) code that you try does to the
runtime state and restart the debugger if it becomes invalid. But in most cases it is
possible to re-run corrected code and work iteratively without restarting your code.&lt;/p&gt;
&lt;p&gt;Here is an example of live interactive coding in Wing Pro after running to a breakpoint in
the editor:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/conditional-breakpoints/interactive.gif" alt="Interactive Development at a Breakpoint" backrefs="" caption="Shown above:  Entering code while the debugger is at a breakpoint, with auto-completion and auto-editing features that inspect the live runtime state of the debug process, then trying out an invocation in the Debug Console." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Entering code while the debugger is at a breakpoint, with auto-completion and auto-editing features that inspect the live runtime state of the debug process, then trying out an invocation in the Debug Console.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;Notice that the above example uses a conditional breakpoint, as described in the &lt;a class="reference" href="https://wingware.com/hints/conditional-breakpoints"&gt;previous
Wing Tip&lt;/a&gt;. These are a great way to
select the specific runtime case for which you want to write new code, for example to fix
a bug that occurs only in a particular scenario.&lt;/p&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Active Ranges&lt;/h3&gt;
&lt;p&gt;The above example simply copied and pasted code into the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Debug&lt;/span&gt; &lt;span class="pre"&gt;Console&lt;/span&gt;&lt;/tt&gt; in order to try
it out. In many cases it's easier to select a range of lines that you are working on and
mark those as the &amp;quot;active range&amp;quot;, so that they can be executed and re-executed repeatedly as
needed.&lt;/p&gt;
&lt;p&gt;This is done by selecting the lines in the editor and pressing the &lt;img src="https://wingware.com/images/doc/en/icons/wingide-active-range-set.png" alt="active-range" backrefs="" class="inline-image" dupnames="" height="18" ids="" names="" width="18" /&gt; active
range icon in the top right of the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Debug&lt;/span&gt; &lt;span class="pre"&gt;Console&lt;/span&gt;&lt;/tt&gt;. Once an active range is set, the
&lt;img src="https://wingware.com/images/doc/en/icons/wingide-execute.png" alt="execute" backrefs="" class="inline-image" dupnames="" height="18" ids="" names="" width="18" /&gt; icon in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Debug&lt;/span&gt; &lt;span class="pre"&gt;Console&lt;/span&gt;&lt;/tt&gt; will execute it in the current debug stack frame.&lt;/p&gt;
&lt;p&gt;See the &lt;a class="reference" href="/doc/debug/debug-console"&gt;Interactive Debug Console&lt;/a&gt; documentation for details.&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;&lt;p&gt;That's it for now! We'll be back soon with more &lt;a class="reference" href="https://wingware.com/hints"&gt;Wing Tips&lt;/a&gt;
for Wing Python IDE.&lt;/p&gt;
&lt;p&gt;As always, please don't hesitate to email &lt;a class="reference" href="mailto:support&amp;#64;wingware.com"&gt;support&amp;#64;wingware.com&lt;/a&gt; if you run into problems or
have any questions.&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">https://wingware.com/hints/live-coding</guid><pubDate>Thu, 08 Jun 2023 01:00:00 GMT</pubDate></item><item><title>Auto Completion in Wing Pro</title><link>https://wingware.com/hints/auto-completion</link><description>&lt;p&gt;In this issue of &lt;a class="reference" href="/hints"&gt;Wing Tips&lt;/a&gt; we introduce Wing Pro's auto-completer, which can
be used to find and more quickly enter symbols, imports, and snippets into Python code.&lt;/p&gt;
&lt;p&gt;By default, Wing shows the auto-completer as you type in the editor, populating the
completer with whatever code symbols and snippets are relevant to the particular context
you are working in. The arrow keys can be used to move up and down the completion list and
a completion is selected by pressing &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tab&lt;/span&gt;&lt;/tt&gt; or other completion key configured with the
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;Editor&lt;/span&gt; &lt;span class="pre"&gt;&amp;gt;&lt;/span&gt; &lt;span class="pre"&gt;Auto-completion&lt;/span&gt; &lt;span class="pre"&gt;&amp;gt;&lt;/span&gt; &lt;span class="pre"&gt;Completion&lt;/span&gt; &lt;span class="pre"&gt;Keys&lt;/span&gt;&lt;/tt&gt; preference in Wing. The same preferences group
lets you specify whether to show the completer immediately or only after a certain number
of characters or elapsed time, how to place the completion, and various other options.&lt;/p&gt;
&lt;p&gt;Here is what the completer looks like in action:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/auto-completion/auto-completer.gif" alt="Auto-Completion in Wing Pro" backrefs="" caption="Shown above:  Using the auto-completer to enter new Python code in Wing Pro." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Using the auto-completer to enter new Python code in Wing Pro.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;Notice that the auto-completer contains two columns of icons like
&lt;img src="https://wingware.com/images/doc/en/icons/wingide-autocomplete-package.png" alt="package" backrefs="" class="inline-image" dupnames="" height="18" ids="" names="" width="36" /&gt; &lt;img src="https://wingware.com/images/doc/en/icons/wingide-autocomplete-method-inherited.png" alt="inherited" backrefs="" class="inline-image" dupnames="" height="18" ids="" names="" width="36" /&gt; and &lt;img src="https://wingware.com/images/doc/en/icons/wingide-autocomplete-function.png" alt="function" backrefs="" class="inline-image" dupnames="" height="18" ids="" names="" width="36" /&gt; that indicate the origin and type of the symbol.
These are described in detail in &lt;a class="reference" href="/doc/edit/completion-icons"&gt;Auto-completion Icons&lt;/a&gt;.&lt;/p&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Auto-Import&lt;/h3&gt;
&lt;p&gt;In Wing 9.1 and later the auto-completer also contains suggestions for modules you may
want to import for the code that you are writing. When these completions are selected,
Wing enters the symbol for the selected import at the current position in the editor and
also adds the necessary import statement at the top of your file:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/auto-completion/auto-import.gif" alt="Auto-importing in Wing Pro" backrefs="" caption="Shown above:  Using the auto-completer to enter code and new import statements simultaneously." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Using the auto-completer to enter code and new import statements simultaneously.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;The &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Editor&lt;/span&gt; &lt;span class="pre"&gt;&amp;gt;&lt;/span&gt; &lt;span class="pre"&gt;Auto-completion&lt;/span&gt; &lt;span class="pre"&gt;&amp;gt;&lt;/span&gt; &lt;span class="pre"&gt;Python&lt;/span&gt; &lt;span class="pre"&gt;Auto-Imports&lt;/span&gt;&lt;/tt&gt; preference controls whether to
always show auto-imports, show them only on request, or to hide them entirely from the
completer.  See also the &lt;a class="reference" href="/doc/refactoring/imports-tool"&gt;Imports&lt;/a&gt; tool.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h3 class="title-3"&gt;Snippets&lt;/h3&gt;
&lt;p&gt;The completer also offers code snippets appropriate for the current context. These are
indicated with the &lt;img src="https://wingware.com/images/doc/en/icons/wingide-autocomplete-snippet.png" alt="snippet" backrefs="" class="inline-image" dupnames="" height="18" ids="" names="" width="36" /&gt; scissors icon. The default set of snippets that come with
Wing Pro may be viewed and altered in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Snippets&lt;/span&gt;&lt;/tt&gt; tool in the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tools&lt;/span&gt;&lt;/tt&gt; menu.&lt;/p&gt;
&lt;p&gt;Here is an example of entering snippets with the auto-completer, using the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tab&lt;/span&gt;&lt;/tt&gt; key to
move between and fill out fields in the snippets:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/auto-completion/snippets.gif" alt="Auto-completing snippets in Wing Pro" backrefs="" caption="Shown above:  Using the auto-completer to enter code snippets for a class, a method, and a nested definition, showing how snippets can take different forms depending on their context in the code." class="doc-image" dupnames="" ids="" names="" style="padding-bottom:5px;margin-bottom:5px;" /&gt;&lt;p style="padding-top:0px;"&gt;&lt;i&gt;Shown above:  Using the auto-completer to enter code snippets for a class, a method, and a nested definition, showing how snippets can take different forms depending on their context in the code.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;See the &lt;a class="reference" href="/doc/edit/snippets"&gt;Code Snippets&lt;/a&gt; documentation for more information.&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;&lt;p&gt;That's it for now!  We'll be back next week with more &lt;a class="reference" href="/hints"&gt;Wing Tips&lt;/a&gt; for
Wing Python IDE.&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">https://wingware.com/hints/auto-completion</guid><pubDate>Thu, 08 Jun 2023 01:00:00 GMT</pubDate></item><item><title>Turbo Completion Mode in Wing Pro</title><link>https://wingware.com/hints/turbo-completion</link><description>&lt;p&gt;In this issue of &lt;a class="reference" href="/hints"&gt;Wing Tips&lt;/a&gt; we look at how to use Wing Pro's turbo completion
mode for Python. Auto-completion normally requires pressing a completion key, as
configured by the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Editor&lt;/span&gt; &lt;span class="pre"&gt;&amp;gt;&lt;/span&gt; &lt;span class="pre"&gt;Auto-completion&lt;/span&gt; &lt;span class="pre"&gt;&amp;gt;&lt;/span&gt; &lt;span class="pre"&gt;Completion&lt;/span&gt; &lt;span class="pre"&gt;Keys&lt;/span&gt;&lt;/tt&gt; preference, before a
completion is entered into the editor.&lt;/p&gt;
&lt;p&gt;Wing Pro also provides a &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Python&lt;/span&gt; &lt;span class="pre"&gt;Turbo&lt;/span&gt; &lt;span class="pre"&gt;Mode&lt;/span&gt;&lt;/tt&gt; for auto-completion, where completion
occurs on any key that cannot be part of a symbol. This allows you to type just enough of
a symbol until it is selected in the completer, then move right on to typing the code that
follows that symbol. It takes some getting used to, but it can greatly reduce typing once
you become comfortable with it.&lt;/p&gt;
&lt;p&gt;The following example shows the code that can be produced simply by typing the characters
&lt;tt class="literal"&gt;&lt;span class="pre"&gt;p=x.p.e.P(&lt;/span&gt;&lt;/tt&gt; without pressing any completion keys:&lt;/p&gt;
&lt;img src="https://wingware.com/images/blog/turbo-completion/turbo-completion.gif" alt="/images/blog/turbo-completion/turbo-completion.gif" backrefs="" class="doc-image" dupnames="" ids="" names="" width="800px" /&gt;&lt;p&gt;This particular case requires only a single character to match each symbol in the auto-completer.
In a more cluttered name space, it may take more characters to match the desired symbol, but in
many cases two or three characters is all that is needed before you can move on to the next part
of the expression you are trying to type.&lt;/p&gt;
&lt;p&gt;Notice that turbo mode distinguishes between contexts where a new symbol may be defined
and those where an existing symbol must be used. For example, if you type &lt;tt class="literal"&gt;&lt;span class="pre"&gt;c&lt;/span&gt;&lt;/tt&gt; followed
by &lt;tt class="literal"&gt;&lt;span class="pre"&gt;=&lt;/span&gt;&lt;/tt&gt; on a new line, Wing knows that the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;=&lt;/span&gt;&lt;/tt&gt; indicates you may be defining a new
symbol and does not place the current selection from the auto-completer. When you do want
completion to occur in a defining context, you can press &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Tab&lt;/span&gt;&lt;/tt&gt; or another completion
key.&lt;/p&gt;
&lt;p&gt;In a context where you are trying to type something other than what is in the completer,
you can press &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Ctrl&lt;/span&gt;&lt;/tt&gt;, &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Alt&lt;/span&gt;&lt;/tt&gt; or &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Command&lt;/span&gt;&lt;/tt&gt; briefly by itself to hide the
auto-completer and thus disable turbo-completion until you type more symbol characters and
the completer is displayed once again.&lt;/p&gt;
&lt;p&gt;Turbo completion is enabled with the &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Editor&lt;/span&gt; &lt;span class="pre"&gt;&amp;gt;&lt;/span&gt; &lt;span class="pre"&gt;Auto-completion&lt;/span&gt; &lt;span class="pre"&gt;&amp;gt;&lt;/span&gt; &lt;span class="pre"&gt;Python&lt;/span&gt; &lt;span class="pre"&gt;Turbo&lt;/span&gt; &lt;span class="pre"&gt;Mode&lt;/span&gt;&lt;/tt&gt; preference
in Wing Pro.&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;&lt;p&gt;That's it for now!  We'll be back next week with more &lt;a class="reference" href="/hints"&gt;Wing Tips&lt;/a&gt; for
Wing Python IDE.&lt;/p&gt;
</description><guid isPermaLink="true">https://wingware.com/hints/turbo-completion</guid><pubDate>Wed, 19 Jan 2022 01:00:00 GMT</pubDate></item></channel></rss>

